Check if Duplicate Element Exists in an Array

Given an array of integers, check if the array contains any duplicates.

Read

Print Matrix in Spiral Order

Given a matrix, print all elements in spiral order.

Read

Find all the Pairs with Given Sum

Given a list of integers, find all pairs with given sum.

Read

Find Combinations of a List Whose Sum is Equal to a Target

Given a list of distinct integers, find all the possible combinations which sums up to a target.

Read

Generate Spiral Matrix

Given a positive integer n, generate a square matrix filled with elements from 1 to n^2 in spiral order.

Read

Minimum Remove to Make Valid Parentheses

Given a string, remove minimum number of parentheses to make it balanced.

Read

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