Medium
Levenshtein Distance
Given 2 strings, find the minimum number of operations required to change one string to the other. An operation is defined as either replacement of a ...
Medium
Minimum Number Of Coins To Make Change
Given an array of coins or denominations and a target sum, calculate the minimum number of coins required to match the total. Note that the coins arra...
Medium
Number of Ways To Make Change
Given a target amount and a set of denominations (coins), find the total number of ways the given target amount can be expressed by using the denomina...
Medium
Maximum Subset Sum With No Adjacent
Given an array of POSITIVE INTEGERS, find the greatest sum that can be generated without adding 2 numbers positioned next to each other.
Medium
Height Balanced Binary Tree
Given a pointer to the root node of a binary tree, return true if the binary tree is height-balanced. A height-balanced binary tree is a Binary tree i...
Medium
Find Successor
Given the root of a binary tree and a node in it, return the in-order successor of that node in the BST. If the given node has no in-order successor i...
Medium
Binary Tree Diameter
Given a Binary Tree, Return an integer that represents the diameter of the Binary Tree. A Diameter is the length of the longest path in the Binary Tre...
Medium
Spiral Traversal
Given a 2D matrix of numbers, return a spiral traversal of the matrix in the clockwise direction.
Easy
BST Traversal
Given a Binary Search Tree, Traverse the tree in Preorder, Postorder, and inorder traversal.
Easy
Depth First Search
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting s...
Medium
Invert Binary Tree
Given a binary tree, invert the binary tree - Inverting a binary tree means that the resulting binary tree should be a mirror replica of the input bin...
Easy
Sorted Squared Array
Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order.
Easy
String Compression
Given a string of alphabets (from a to z), Print the count of the character appearing in the string right next to it. This is also called Run Length E...
Easy
Remove Duplicates From a Linked List
Given a sorted linked list, delete all duplicates such that each element appear only once.
Easy
Palindrome Check
Given a string of characters, Check if the given string is a palindrome or not. A palindrome is a word, phrase, or sequence that reads the same backwa...
Easy
Product Sum
Given an array (that can have nested arrays) - return the sum of all the numbers in the array. If nested array is encountered, recursively add the num...
Easy
Three Number Sum
Given an array of integers, find three integers in the array that sum to a specific target number.
Medium
BST Construction
Construct a Binary Search Tree and implement that implements insert, search, traverse and delete methods.
Easy
Branch Sums in a Binary Tree
Given a Binary Tree, compute the sum of all the branches in the tree. 1 branch is the path from the root to a leaf.
Easy
Binary Search
Given an array of sorted integers in ascending order, and a target integer, write a function to search target in nums array. If target exists, return ...
Easy
Monotonic Arrays
A monotonic array is an array whose elements, from left to right, are entirely non-increasing, or entirely non-decreasing. Return true if the given ar...
3 likes