though its a bst question i am using the concept of sorted arrays but still its showing wrong output.
Print BST keys in the given range
Consider input:
1
10
14 17 7 18 12 5 4 6 21 24
11 17
Expected o/p:
# Preorder : 14 7 5 4 6 12 17 18 21 24
# Nodes within range are : 12 14 17
Your o/p:
# Preorder : 12 5 4 6 7 18 14 17 21 24
# Nodes within range are : 12 14 17
https://ide.codingblocks.com/s/289095 Refer this code and check how it is done
1 Like
sir please this too