Amazon Interview Question

Trees and Graphs: Given a binary tree, write a function to determine if it’s balanced. Find the lowest common ancestor (LCA) of two nodes in a binary search tree (BST). Implement depth-first search (DFS) and breadth-first search (BFS) for a graph.