Rotated Array — Asked in Ola and Facebook Interview

Problem Statement :

N = 4
Arr = {3 4 1 2}
1

Explanation of given Test Cases :

Approach :

Optimized Approach

Code :

Thanks for Reading

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store