unknown Interview Question
Software DevelopersCountry: India
Interview Type: Written Test
Any body got confused with "rotated by k positions". Does it mean k is known ?
I interpreted as k is known. So that answer should be O(1) in my opinion.
The expected answer is O(logn).
I think the interpretation should be rotated randomly by k position, k being, unknown.
What do others think ?
Does it in O(logn) times. If k is provided , then you don't need the algorithm.
- Engineer1111 October 11, 2018