1. mutable, non mutable classes in Java 2. declaring constants in Java 3. x^y algorithm and its optimization. 4. second largest number from Binary Tree
Utilisateur anonyme
For #4, is it possible the question was "how to find the second largest number in a Binary Search Tree"? If so, it can be done in O(log n) by starting at the root node, traversing right repeatedly until you reach a leaf node, and then returning the parent of that last node. If its just some random binary tree without any ordering, you'd have to traverse the whole tree.