Given an absolute path for a file (Unix-style), simplify it. Or in other words, convert it to the canonical path.
String - 71. Simplify Path
redis自己构建的一种名为简单动态字符串（simple dynamic string，SDS）的抽象类型。
Given two binary strings, return their sum (also a binary string).
String - 67. Add Binary
Implement pow(x, n), which calculates x raised to the power n (xn).
Math - 50. Pow(x, n)
Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '*'.
String - 44. Wildcard Matching
Write a program to solve a Sudoku puzzle by filling the empty cells.
DFS&BFS - 37. Sudoku Solver
Determine if a 9x9 Sudoku board is valid.
Array - 36. Valid Sudoku
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).
Array - 57. Insert Interval
Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix.
Binary Search - 378. Kth Smallest Element in a Sorted Matrix
Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.
Array - 59. Spiral Matrix II
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.
Array - 54. Spiral Matrix
Given a non-empty, singly linked list with head node head, return a middle node of linked list.
LinkedList - 876. Middle of the Linked List
You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise).
Array - 48. Rotate Image
Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.
string- 43. Multiply Strings
Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value.
Array - 34. Find First and Last Position of Element in Sorted Array
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.
Array - 31. Next Permutation
8.String to Integer (atoi) Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from this character, takes an optional initial plus or minus sign followed by as many numerical digits as possible, and interprets them as a numerical value. The string can contain additional characters after those that form the integral number, which are ignored and have no effect....
String - 8. String to Integer (atoi)
16. 3Sum Closest 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. Example: Given array nums = [-1, 2, 1, -4], and target = 1. The sum that is closest to the target is 2. (-1 + 2 + 1 = 2). 思路： 给定一个数组，找出三个数的和最接近target，和15题很像，做法类似，都是对于每一位元素，用双指针找出另外两个数，更新出一个最小的结果就可以。 代码： go： f....
Array - 16. 3Sum Closest