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…
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1:…
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall…
Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer…
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain…
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may…
Suppose you have a random list of people standing in a queue. Each person is described by a pair of…
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water…
Given a collection of intervals, merge all overlapping intervals. Example 1: Input: [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] and…
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1->4->5,…
This website uses cookies.