Round 1 Algo questions.
1. You are given an array and a function which reverses the array. We have to sort the array using the reverse function. We have to return the minimum no of calls to function in which array can be sorted.
2. Given a graph in which there is an edge between (u,v) if gcd(u,v)>g . Given queries of u,v find if a path from u,v exists.
R2: 1. Given a string find length of longest substring.
2. Given a binary string of 0 and 1 . Find longest substring which contain equal number of 0 and 1.
3. Given an immutable array of size n+1, containing numbers between [0,n]. Find any one number that repeats.