cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Binary search trees
Binary search trees
Apr 4, 2012 at 5:55pm UTC
hopesfall
(179)
Can anyone describe in plain language (no code needed), an iterative algorithm for locating an element stored in a binary search tree? I can only think of it recursively and am having trouble thinking of it in an iterative way.
Apr 4, 2012 at 7:13pm UTC
naraku9333
(2163)
Check node data, if its greater then the data your searching for go left, if its less go right and if its equal you found the node.
Topic archived. No new replies allowed.