You are on page 1of 1

Extra

Questions

1. Given an array of integers, sort the array into a wave like array and
return it. In other words, arrange the elements into a sequence such
that a1 >= a2 <= a3 >= a4 <= a5 >=a6....
2. Given a string, find largest substring with no repetition i.e all unique
characters. E.g - for string abcdabceb , answer will be dabce
3. Write a program to multiply 2D arrays A and B of dimensions NxL and
LxM respectively.
4. Given a NxN matrix with 0s and 1s. Set every row that contains a 0 to
all 0s and set every column that contains a 0 to all 0s.
Input -
10110
01110
11111
10111
11111
Output -
00000
00000
00110
00000
00110

5. Rotate a 2D matrix by 90 degrees clockwise


E.g - Consider Array
1 2 3
4 5 6
7 8 9
After rotating 90 degrees clockwise it will be -
7 4 1
8 5 2
9 6 3

You might also like