Question
What is the worst-case time complexity for searching an
element in a general (unbalanced) binary tree?Solution
In the worst case, a general binary tree can degenerate into a skewed tree (like a linked list), where searching for an element might require traversing all 'n' nodes, leading to O(n) time complexity.