Professional Documents
Culture Documents
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