1. You’re given a m x m matrix. Write a function to rotate submatrix within the matrix by 90degree clock wise. Function takes x and y as starting row and column coordinate of matrix and N as size of submatrix as argument. Inplace rotation was required. I gave brute force I.e. With extra memory.
2. You are given a sorted array containing both negative and positive values. Resort the array taking absolute value of negative numbers. Your complexity should be O(n)
Ex. A = {-8,-5,-3,-1,3,6,9}
Output: {-1,-3,3,-5,6,-8,9}
3. Wap to find subsets that contains equal sum in an array:
for eg{1,2,3,4,2}->{1,2,3}&&{4,2}
{1,1,3,3,2,8}->{1,3,3,2}&&{1,8}
{1,3,4,7}->no subset