摘要:
We have a list of points on the plane. Find the K closest points to the origin (0, 0). (Here, the distance between two points on a plane is the Euclid 阅读全文
摘要:
A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possibl 阅读全文
摘要:
In a binary tree, the root node is at depth 0, and children of each depth k node are at depth k+1. Two nodes of a binary tree are cousins if they have 阅读全文
摘要:
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: No 阅读全文
摘要:
Given a linked list, determine if it has a cycle in it. To represent a cycle in the given linked list, we use an integer pos which represents the posi 阅读全文
摘要:
Given an array of integers nums, sort the array in ascending order. Example 1: Example 2: Note: 参考 https://www.cnblogs.com/fatttcat/p/10058544.html M1 阅读全文
摘要:
The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding one 阅读全文
摘要:
We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wron 阅读全文
摘要:
2. Add Two Numbers - Medium topics: linked list, math solution 3. Longest Substring Without Repeating Characters - Medium topics: hash table, two poin 阅读全文
摘要:
Sliding Window Problems 76. Minimum Window Substring 438. Find All Anagrams in a String 30. Substring with Concatenation of All Words 3. Longest Subst 阅读全文