- Find the median of two sorted arrays.
- Given a list of items with values and weights, as well as a max weight, find the maximum value you can generate from items where the sum of the weights is less than the max.
- Given an array of integers where each value 1 <= x <= len(array), write a function that finds all the duplicates in the array.
- Given an unsorted array, find the length of the longest sequence of consecutive numbers in the array.
- Given a boolean matrix, update it so that if any cell is true, all the cells in that row and column are true.
- Given a directed graph, find the shortest path between two nodes if one exists.
- Given a list of array of N integers, Print the sums of all subset in it.
- Write a function that returns all permutations of a given list.
- Given a string s, find the length of the longest substring without repeating characters.
- Given a binary tree, where every node value is a Digit from 1-9 .Find the sum of all the numbers which are formed from root to leaf paths.
- Given an n x m array where all rows and columns are in sorted order, write a function to determine whether the array contains an element x.
- Given an unsorted array( A )of size N that contains only non-negative integers, find a continuous sub-array which adds to a given number S.
- Implement a binary tree with a method getRandomNode() that returns a random node.
- Given a linked list, write a function that prints the nodes of the list in reverse order.
- Given a binary tree, write a function to determine whether the tree is balanced.
- Given a stack, sort the elements in the stack using one additional stack.
- Given a linked list, determine whether it contains a cycle.
- Given an unsorted linked list, write a function to remove all the duplicates.
- Given a string, write a function to compress it by shortening every sequence of the same character to that character followed by the number of repetitions. If the compressed string is longer than the original, you should return the original string.
- Given two integers, write a function to determine whether or not their binary representations differ by a single bit.
- Given two strings, write a function that returns the longest common substring length.
- Implement priotity queue.
- Given an integer array nums that may contain duplicates, return all possible subsets.
- Robot bounded in circle.
- You are given an array of integers arr, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position. Return the max sliding window.
- Given a non-empty array of integers nums, every element appears twice except for one. Find that single one.
- Given a sorted array and a number x, find the pair in array whose sum is closest to x
- Given an m x n matrix, return all elements of the matrix in spiral order.
- Given a 2D integer array matrix, return the transpose of matrix.
- Given an unsorted integer array nums, return the smallest missing positive integer.