suppose numbers from 1 to 1000 are saved in a binary search tree and we want to find 363. Which of the following sequences cannot be the order of elements while reaching the searched value?
- 925, 202, 911, 240, 912, 245, 363
- 924, 220, 911, 244, 898, 258, 362, 363
- 2, 252, 401, 398, 330, 344, 397, 363
- 2, 399, 387, 219, 266, 382, 381, 278, 363
I converted them to rooted binary search trees but I couldn't figure out what should be wrong with them. More precisely, I don't know how to check BST properties in such sequences.