943,561 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Marked Solved
  • Views: 1720
  • Python RSS
Apr 6th, 2009
0

Recursive binary search

Expand Post »
does anyone know how to test a recursive bianry search to check if it works
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
srk619 is offline Offline
42 posts
since Mar 2009
Apr 6th, 2009
0

Re: Recursive binary search

I think that you are asking for help in seeing that your function actually goes through all the steps of binary search on a list. Why don't you create a small test list and place a print statement in your code that displays the sublist that is sent back to the function at each recursive call. Since the list is small you can easily tell what the proper search path should be. If the output is what you should be seeing then it is likely that your code works.
Reputation Points: 11
Solved Threads: 4
Newbie Poster
Nine Tails is offline Offline
20 posts
since Mar 2009
Apr 6th, 2009
0

Re: Recursive binary search

You might find this is interesting: http://www.paulbutler.org/archives/p...th-decorators/
Reputation Points: 10
Solved Threads: 2
Newbie Poster
jaux is offline Offline
15 posts
since Oct 2007
Apr 8th, 2009
0

Re: Recursive binary search

ur link didnt help but ive solved it thx
Reputation Points: 10
Solved Threads: 0
Light Poster
srk619 is offline Offline
42 posts
since Mar 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Final Python Project for Web Programming Class... And I'm Stuck :(
Next Thread in Python Forum Timeline: Payroll Calculation





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC