Time complexity to find the diameter of a binary tree having n nodes is
ISRO Scientist/Engineer SC · 2023 · Computer Science · Part A · Discipline
Time complexity to find the diameter of a binary tree having n nodes is
- A.
O(n2)
- B.
O(n)
- C.
O(1)
- D.
O(logn)
Attempted by 1320 students.
Show answer
Correct answer: B
Explore the full course: Iocl Engineers Officers Grade A Paper 2
Loading lesson…