I'm preparing for Team Selection Competition and these are some problems that I want to know how to solve. Problems are from previous competitions
Given array with N < = 5 * 105 elements. Find number of subarrays such that every element in subarray appears even times
Given N < = 5000 strings. Find the number of pairs of strings such that after concatenating these strings, new string is palindrome
Given A, N, M . We perform this operation N times : A = (A+biggestDigit(A))%M . Find A after N operations. A < M < = 1018 and N < = 1018
Edit: biggestDigit(A) is digit with biggest value, not most significant one
Given N * N matrix A and Q < = 5 * 105 queries N < = 1000.
First query: 1 X Y, find farthest element in matrix such that its value is less than A[X][Y] (Manhattan distance)
Second query: 2 X Y VAL change element A[X][Y] to VAL