Company- CommVault
Position – SDE-1
Time- 1 hour
There were 13 MCQ based on c++ and 3 coding questions.
There were sectional timings for the MCQ (20 minutes) and coding round (40 minutes).
1. There was a 2-D array of ‘o’ and ‘x’. We have to rotate the array 90 degree and then bring all the ‘x’ in the bottom part of the 2-D matrix.
Input: o x o x x o o o x Output: o o o o x o x x x
2. Given two strings a and b, return the size of substring matching in both the strings
Input: String 1- ROMANINROMES String 2- XMANBATANINROMY Output- 7
Explanation:
ROM"ANINROM"ES XMANBAT"ANINROM"Y
The string in quotes are matching and their size is 7.
3. Find the number of turns to convert the string so that no two ‘x’ and ‘y’ are together.
Input: xxxyxyxyy Output- 3
Explanation:
xxxyxyxyyy -> xyxyxyxyxy