Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Notice that the solution set must not contain duplicate triplets.
Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order.
Given an m x n matrix, return all elements of the matrix in spiral order. The Spiral Matrix problem takes a 2-Dimensional array of N-rows and M-columns as an input, and prints the elements of this matrix in spiral order.
Write an efficient algorithm that searches for a target value in an m x n integer matrix.
Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each input would have exactly one solution.
Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] inclusive that do not appear in this array.
Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input.
Given a matrix, A of size M x N of 0’s and 1’s. If an element is 0, set its entire row and column to 0.
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.
The Dutch national flag problem is a computer science programming problem proposed by Edsger Dijkstra. The flag of the Netherlands consists of three colors: red, white and blue