1.) Find the pivot point. to find pivot  – for a sorted (in increasing 
order) and pivoted array, pivot element is the only only element for which 
next element to it is smaller than it. 
2.) divide the array into two subarray and apply binary search.
for calling binary search in two subarray - if the element is greater than 
the first element : search (binary seach) in left subarray else in right 
subarray.

example array : 123456
pivoted array : 345612

complexity :O(logn) where n are the number of elements

           


On Tuesday, August 28, 2012 11:26:03 PM UTC+5:30, rahul sharma wrote:
>
> plz provide me algo for this,thnx 

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/oPmnJQ8tEGwJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to