原创 Divide Two Integers

一. Divide Two Integers Divide two integers without using multiplication, division and mod operator. If it is overfl

原创 Trapping Rain Water

一. Trapping Rain Water Given n non-negative integers representing an elevation map where the width of each bar is 1

原创 Reverse Nodes in k-Group

一. Reverse Nodes in k-Group Given a linked list, reverse the nodes of a linked list k at a time and return its modi

原创 Longest Valid Parentheses

一. Longest Valid Parentheses Given a string containing just the characters ‘(’ and ‘)’, find the length of the long

原创 Merge k Sorted Lists

一. Merge k Sorted Lists Merge k sorted linked lists and return it as one sorted list. Analyze and describe its comp

原创 Multiply Strings

一. Multiply Strings Given two non-negative integers num1 and num2 represented as strings, return the product of num

原创 String to Integer (atoi)

一. String to Integer (atoi) Implement atoi to convert a string to an integer. Hint: Carefully consider all possible

原创 Arithmetic Slices II - Subsequence

一. Arithmetic Slices II - Subsequence A sequence of numbers is called arithmetic if it consists of at least three e

原创 Regular Expression Matching

一. Regular Expression Matching Implement regular expression matching with support for ‘.’ and ‘*’. ‘.’ Matches any

原创 Wildcard Matching

一. Wildcard Matching Implement wildcard pattern matching with support for ‘?’ and ‘*’. ‘?’ Matches any single chara

原创 Sudoku Solver

一. Sudoku Solver Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by

原创 First Missing Positive

一. First Missing Positive Given an unsorted integer array, find the first missing positive integer. For example, G

原创 Container With Most Water

一. Container With Most Water Given n non-negative integers a1 , a2 , …, an , where each represents a point at coord

原创 4Sum

一. 4Sum Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Fi

原创 3Sum Closest

一. 3Sum Closest Given an array S of n integers, find three integers in S such that the sum is closest to a given nu