All Questions
3 questions
2
votes
1
answer
95
views
Semi-dynamic range minimum query (RMQ) tree in Java
Introduction
I have this semi-dynamic range minimum query (RMQ) tree in Java. It is called semi-dynamic due to the fact that it cannot be modified after it is constructed. However, the values ...
2
votes
2
answers
222
views
Lowest Common Ancestor in Binary Tree (Iterative)
In the below code I've implemented a method to find the lowest common ancestor of a binary tree.
This is an iterative approach using this pseudocode.
Please suggest any improvements that can be made.
<...
1
vote
2
answers
286
views
Leetcode: Cousins in Binary Tree
Mu solution to Leetcode problem Cousins in Binary Tree works, but the code feels bulky. Is there a better way to solve this problem, particularly to use less additional variables? I will appreciate ...