Tutorials »

I recently wrote a quick code to find if a numeric array is ordered i.e sorted in a ascending or descending order. I needed it to check a sort algorithm I had written. The problem is that the following code has a worst-case running time of O(N). Can we make the running time logarithmic.


/* [...]
Posted by andyg 509 days ago (http://abcphp.com)
Discuss  | Bury | Tweet This | Tagged: finding array ordered
| Add To 

Who Voted for this Story

Comments

No one has commented on this article yet.

Log in to comment or register here.