Binary Lifting for Ancestors in Java

Trees usually expose parent links that move upward toward the root, but walking those links one step at a time doesn’t scale well when the…