isBalanced(root) = isBalanced(root.left) && isBalanced(root.right) but given a node, how to check if it is or not, we should do this: isBalanced(root) = Math.abs(height(root.left) - height(root.right)) < 1 classSolution{publicbooleanisBalanced(TreeNode root){if(root ==null)retur...
minimum spanning tree DFS-based algorithms (see Aduni videos above): check for cycle (needed for topological sort, since we'll check for cycle before starting) topological sort count connected components in a graph list strongly connected components check for bipartite graph Even More Knowledge Re...