Data Structures & Algorithms

Second Largest Node in Binary Search Tree

Given the root to a binary search tree, find the second largest node in the tree.

Read

Dijkstra Algorithm - Snippet

Snippet for Dijkstra’s Shortest Path Algorithm

Read

Count Number of Substrings with Only 1s

Given a binary string, count no of substrings with only 1's.

Read

Number of Differing Bits

Given two integers count the number of positions where there bit representation differ.

Read

Maximum Value of Equation of Ones with Addition and Multiplication Operations

Find the maximum value of an equation of ones with addition and multiplication operations

Read

Binary Tree Reverse Level Order Traversal

Given a binary tree, print its reverse level order traversal

Read