First Round (1 Hour)
- There is an array with each element representing working day in an organization . You have to take k consecutive days such that maximum working days are covered .
- Example : the days are [2,4,5,8,14,18] k = 4
- The answer would be 3 as you can take [2,3,4,5] and it would cover 3 working days(2,4,5) .
- Solution using sliding window techinque .
- given a 2D array of 0s and 1s and a starting point , find the closest one .
Second Round (1 Hour)
- It was a simple question to print pascal triangle given the size .
- Given a string containting only A-Z characters , if 2 adjancent characters are same, change the second character(right) to next character (For example A->B , B->C , if its Z->A and so on). Perform this series of steps until no two adjacent characters are same in the string . Print the final string after performing this operation .
Note : You have to scan from right to left in one pass and do the operation
For Example - > We have AAAA
the final string would AAAA -> ABBB -> ABCC -> ABCD (Final)
For ABBBCC -> ABCCCD -> ABCDDD -> ABCDEE -> ABCDEF
Third Round ( 1 hour)
- Questions about current work
- Why do you want to join and expections from the role ?
- Question about indexing
- Write a program to generate all permutations of a string (https://leetcode.com/problems/permutations/)
Got the verdict(selected) the next day after all rounds were completed