Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    Err, with recursion, you call the method itself within the method... I don't see you do that. Commented Nov 15, 2010 at 19:31
  • Suppose that you only have one item in your array. Then lower==upper and you will never enter the while loop. Commented Nov 15, 2010 at 19:33
  • This has nothing to do with recursion Commented Nov 15, 2010 at 19:40
  • The homework tag is not to be used any more. Commented Nov 15, 2010 at 20:03
  • I like how you return the compareResult instead of the index. Commented Nov 15, 2010 at 20:05