Zoho L1 Coding round Apirl 2024
- Posted
- 29 Apr 2024
Summary
I had a coding round interview for Zoho L1 in April 2024, where I was presented with two distinct algorithmic problems: one involving array partitioning with specific constraints and another focused on removing common words from an array of strings without using built-in split methods.
How it went
My interview experience for the Zoho L1 Coding round in April 2024 involved tackling two challenging programming questions. The format was a standard coding round where I needed to implement solutions to the given problems. I focused on understanding the constraints and edge cases for each problem before attempting to code a solution.
Questions asked (2)
- 01
Array Partition for Equal Sum (Non-Contiguous, Unequal Length)
Data Structures & Algorithms · Hard
Write a program which takes an array as input. It will divide the array into two non-contiguous subarrays such that their sums are equal. The subarrays should not be of equal size, and the original array should not be sorted. Return
trueif such a partition is possible,falseotherwise.
Sample Case 1: Array{1,5,11,5}
Subarray1{1,5,5}, Subarray2{11}→ 11 = (1+5+5)true
Sample Case 2: Array{5, 3,2}
Subarray1{5}, Subarray2{3,2}→ 5 = (3+2)true
Sample Case 3: Array{1,6,3,8,4}
Subarray1{1,6,4}, Subarray2{8,3}→ (1+6+4) = 11, (8+3) = 11true
Sample Case 4: Array{5,1,3}→false - 02
Remove Common Words from Strings in an Array
Data Structures & Algorithms · Medium
Write a Java program that takes an array of strings (
strings[]) as input. The program should identify common words repeating in all strings in the string array. If a word is found to be common across all strings, it should be removed from all strings. The program should return two strings: one containing the strings after removing the common words, and another containing the removed common words.
Constraint: Do not use Java string methods likesplit.