Data Structures & Algorithms

Check if a Binary Tree is Balanced or Not

Given root of a binary tree, check if it is balanced or not.

Read

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