You are tasked to construct a binary search tree (BST) from a stream of incoming sensor readings, where each reading is processed as it arrives. Midway, the…
You are tasked to construct a binary search tree (BST) from a stream of incoming sensor readings, where each reading is processed as it arrives. Midway, the sensor malfunctions and emits a duplicate reading not originally in the stream. To preserve BST properties and ensure efficient future search operations, which strategy should you employ for the duplicate reading?
Show answerHide answer
Correct answer: (C) Ignore the duplicate and continue inserting unique values