dsa1 min read
Search in a Binary Search Tree — BST Property Navigation
Find a node with given value in a BST by navigating left or right based on the BST property.
Read →
webcoderspeed.com
1276 articles
Find a node with given value in a BST by navigating left or right based on the BST property.
Return values grouped by level using BFS with a queue, processing each level in a batch loop.
Traverse a binary tree in zigzag level order by toggling insertion direction at each level.
Find the rightmost node at each level using BFS and taking the last element seen at each depth.
Collect all root-to-leaf paths with a given sum using DFS backtracking, appending and removing the current node.