You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are given a sorted array of N elements. But unfortunately the array has been circularly shifted 0<K<N times and you don’t know that K. Design the following algorithm: Detect How many times the array has been circularly shifted, find the K. Your Algorithm should run in O(log N) time and Design an O(N) algorithm which should undo those rotatio…
You have N elements array but you are given that there are only K distinct values which have been repeated again and again in any order. For example N could be 1000 and K could be 10 means that the array contains only 10 values which are being duplicated anywhere in the array. Now you want to sort that array. You must have to give appropriate im…