摘要:
题目大意 https://leetcode.com/problems/generate-parentheses/description/ 22. Generate Parentheses Given n pairs of parentheses, write a function to genera 阅读全文
摘要:
题目大意 https://leetcode.com/problems/unique-paths/description/ 62. Unique Paths A robot is located at the top-left corner of a m x n grid (marked 'Start 阅读全文
摘要:
题目大意 https://leetcode.com/problems/find-the-duplicate-number/description/ 287. Find the Duplicate Number Given an array nums containing n + 1 integers 阅读全文
摘要:
题目大意 https://leetcode.com/problems/product-of-array-except-self/description/ 238. Product of Array Except Self Given an array nums of n integers where 阅读全文
摘要:
题目大意 https://leetcode.com/problems/binary-tree-inorder-traversal/description/ 94. Binary Tree Inorder Traversal Given a binary tree, return the inorde 阅读全文
摘要:
题目大意 https://leetcode.com/problems/count-primes/description/ 204. Count Primes Count the number of prime numbers less than a non-negative number, n. E 阅读全文
摘要:
题目大意 判断单链表中是否存在环 解题思路 Approach 1: Hash Table 哈希表 Intuition To detect if a list is cyclic, we can check whether a node had been visited before. A natur 阅读全文
摘要:
题目大意 解题思路 关键点:左子树和右子树成镜像关系,根树与本身成镜像关系。 Approach 1: Recursive 递归法 A tree is symmetric if the left subtree is a mirror reflection of the right subtree. 阅读全文