[LeetCode] All questions numbers conclusion 所有题目题号

Note: 后面数字n表明刷的第n + 1遍, 如果题目有**, 表明有待总结

Conclusion questions:

[LeetCode] questions conclustion_BFS, DFS

LeetCode questions conclustion_Path in Tree

[LeetCode] questions conlusion_InOrder, PreOrder, PostOrder traversal

[LeetCode] questions for Dynamic Programming

[LeetCode] questions conclusion_ Binary Search

Questions:

[LeetCode] 733. Flood Fill_Easy tag: BFS   1

[LeetCode] 690. Employee Importance_Easy tag: BFS   1

[LeetCode] 529. Minesweeper_ Medium_ tag: BFS   1

[Leetcode] 863. All Nodes Distance K in Binary Tree_ Medium tag: BFS, Amazon   1

[LeetCode] 199. Binary Tree Right Side View_ Medium tag: BFS, Amazon   1

[LeetCode] 200. Number of Islands_ Medium tag: BFS   1

[LeetCode] 102. Binary Tree Level Order Traversal_Medium tag: BFS   1

[LeetCode] 127. Word Ladder _Medium tag: BFS   1

[LeetCode] 675. Cut Off Trees for Golf Event_Hard tag: BFS   1

[LeetCode] 133. Clone Graph_ Medium tag: BFS, DFS   1

[LeetCode] 207 Course Schedule_Medium tag: BFS, DFS   1

[LeetCode] 103. Binary Tree Zigzag Level Order Traversal _ Medium tag: BFS   1

[LeetCode] 101. Symmetric Tree_ Easy tag: BFS   1

[LeetCode] 513. Find Bottom Left Tree Value_ Medium tag: BFS   1

[LeetCode] 261. Graph Valid Tree _ Medium tag: BFS   1

[LeetCode] 286. Walls and Gates_Medium tag: BFS   1

[LeetCode] 785. Is Graph Bipartite?_Medium tag: DFS, BFS   1

[LeetCode] 210. Course Schedule II   1

[LeetCode] 301. Remove Invalid Parentheses_Hard tag:BFS   1

[LeetCode] 104. Maximum Depth of Binary Tree_Easy tag: DFS   2

[LeetCode] 827. Making A Large Island   1

[LeetCode] 694. Number of Distinct Islands   1

[LeetCode] 711. Number of Distinct Islands II_hard tag: DFS   1

[LeetCode] 851. Loud and Rich_ Medium tag: DFS   1

[LeetCode] 112. Path Sum_Easy tag: DFS   1

[LeetCode] 114. Flatten Binary Tree to Linked List_Medium tag: DFS   1

[LeetCode] 116&117. Populating Next Right Pointers in Each Node I&II_Medium tag: BFS(Dont know why leetcode tag it as DFS...)   1

[LeetCode] 257. Binary Tree Paths_ Easy tag: DFS   1

[LeetCode] 113. Path Sum II   1

[LeetCode] 198. House Robber _Easy tag: Dynamic Programming   2

[LeetCode] 221. Maximal Square _ Medium Tag: Dynamic Programming   2

[LeetCode] 437. Path Sum III_ Easy tag: DFS   1

[LeetCode] 124. Binary Tree Maximum Path Sum_ Hard tag: DFS recursive, Divide and conquer   

[LeetCode] 687. Longest Univalue Path_Easy tag: DFS recursive

[LeetCode] 298. Binary Tree Longest Consecutive Sequence_Medium tag: DFS recursive   1

[LeetCode] 549. Binary Tree Longest Consecutive Sequence II_ Medium tag: DFS recursive

[LeetCode] 721. Accounts Merge_Medium tag: DFS recursive

[LeetCode] 394. Decode String_Medium tag: stack 666   1

[LeetCode] 62. Unique Paths_ Medium tag: Dynamic Programming

[LeetCode] 64. Minimum Path Sum_Medium tag: Dynamic Programming

[LeetCode] 72. Edit Distance_hard tag: Dynamic Programming

[LeetCode] 161. One Edit Distance_Medium

[LeetCode]94, 144, 145 Binary Tree InOrder, PreOrder, PostOrder Traversal_Medium   2

[LeetCode] 589. N-ary Tree Preorder Traversal_Easy   2

[LeetCode] 429. N-ary Tree Level Order Traversal_ Easy   1

[LeetCode] 590. N-ary Tree Postorder Traversal_Easy   1

[LeetCode] 98. Validate Binary Search Tree_Medium   1

[LeetCode] 230. Kth Smallest Element in a BST_Medium tag: Inorder Traversal   1

[LeetCode] 285. Inorder Successor in BST_Medium tag: Inorder Traversal

[LeetCode] 105. Construct Binary Tree from Preorder and Inorder Traversal_Medium tag: Tree Traversal

[LeetCode] 106. Construct Binary Tree from Postorder and Inorder Traversal_Medium tag: Tree Traversal

[LeetCode] 255. Verify Preorder Sequence in Binary Search Tree_Medium tag: Preorder Traversal, tree

[LeetCode] 331. Verify Preorder Serialization of a Binary Tree_Medium tag: stack

[LeetCode] 329. Longest Increasing Path in a Matrix_Hard tag: Dynamic Programming, DFS, Memoization

[LintCode] 394. Coins in a Line_ Medium tag:Dynamic Programming_博弈

[LintCode] 395. Coins in a Line 2_Medium tag: Dynamic Programming, 博弈

[LeetCode] 42. Trapping Rain Water_hard tag: Two Pointers

[LeetCode] 877. Stone Game == [LintCode] 396. Coins in a Line 3_hard tag: 区间Dynamic Programming, 博弈

[LeetCode] 312. Burst Balloons_hard tag: 区间Dynamic Programming

[LeetCode] 53. Maximum Subarray_Easy tag: Dynamic Programming

[LeetCode] 152. Maximum Product Subarray_Medium tag: Dynamic Programming

[LeetCode] 674. Longest Continuous Increasing Subsequence_Easy Dynamic Programming

[LeetCode] 121. Best Time to Buy and Sell Stock_Easy tag: Dynamic Programming

[LeetCode] 122. Best Time to Buy and Sell Stock II_Easy tag: Dynamic Programming

[LeetCode] 111. Minimum Depth of Binary Tree_Easy tag:DFS   1

[LeetCode] 110. Balanced Binary Tree_Easy tag: DFS   2

[LeetCode] 100. Same Tree_Easy tag: DFS   2

[LeetCode] 99. Recover Binary Search Tree   1

[LeetCode] 130. Surrounded Regions_Medium tag: DFS/BFS  1

[LeetCode] 695. Max Area of Island_Easy tag: DFS/BFS

[LeetCode] 129. Sum Root to Leaf Numbers_Medium tag: DFS   1

[LeetCode] 490. The Maze_Medium tag: BFS/DFS

[LeetCode] 787. Cheapest Flights Within K Stops_Medium tag: Dynamic Programming, BFS, Heap

[LeetCode] 310. Minimum Height Trees_Medium tag: BFS

[LeetCode] 559. Maximum Depth of N-ary Tree_Easy tag: DFS

[LeetCode] 1. Two Sum_Easy tag: Hash Table   1

[LeetCode] 292. Nim Game_Easy tag: Math

[LeetCode] 458. Poor Pigs_Easy tag: Math

[LeetCode] 237. Delete Node in a Linked List_Easy tag: Linked List

[LeetCode] 195. Tenth Line_Easy tag: Bash

[LeetCode] 595. Big Countries_Easy tag: SQL

[LeetCode] 561. Array Partition I_Easy tag: Sort

[LeetCode] 38. Count and Say_Easy

[LeetCode] 193. Valid Phone Numbers_Easy tag: Bash

[LeetCode] 258. Add Digits_Easy tag: Math

[LeetCode] 88. Merge Sorted Array_Easy tag: Two Pointers

 [LeetCode] 176. Second Highest Salary_Easy tag: SQL

[LeetCode] 557. Reverse Words in a String III_Easy tag: String

[LeetCode] 67. Add Binary_Easy tag: String

[LeetCode] 415. Add Strings_Easy tag: String

[LeetCode] 443. String Compression_Easy tag:String

[LeetCode] 697. Degree of an Array_Easy tag: Hash Table

[LeetCode] 627. Swap Salary_Easy tag: SQL

[LeetCode] 69. Sqrt(x)_Easy tag: Binary Search

[LeetCode] 680. Valid Palindrome II_Easy tag: Two Pointers

[LeetCode] 717. 1-bit and 2-bit Characters_Easy

[LeetCode] 804. Unique Morse Code Words_Easy tag: Hash Table

[LeetCode] 438. Find All Anagrams in a String_Easy

[LeetCode] 628. Maximum Product of Three Numbers_Easy

[LeetCode] 339. Nested List Weight Sum_Easy tag:DFS

[LeetCode] 364. Nested List Weight Sum II_Medium tag:DFS

[LeetCode] 724. Find Pivot Index_Easy tag: Dynamic Programming

 [LeetCode] 232. Implement Queue using Stacks_Easy tag: Design

[LeetCode] 252. Meeting Rooms_Easy tag: Sort

[LeetCode] 181. Employees Earning More Than Their Managers_Easy tag: SQL

[LeetCode] 172. Factorial Trailing Zeroes_Easy tag: Math

[LeetCode] 243. Shortest Word Distance_Easy

[LeetCode] 190. Reverse Bits_Easy tag: Bit Manipulation

[LeetCode] 832. Flipping an Image_Easy

[LeetCode] 196. Delete Duplicate Emails_Easy tag: SQL

[LeetCode] 345. Reverse Vowels of a String_Easy tag:Two Pointers

[LeetCode] 836. Rectangle Overlap_Easy

[LeetCode] 168. Excel Sheet Column Title_Easy tag: Math

[LeetCode] 796. Rotate String_Easy **KMP

[LeetCode] 821. Shortest Distance to a Character_Easy tag: BFS

[LeetCode] 183. Customers Who Never Order_Easy tag: SQL

[LeetCode] 605. Can Place Flowers_Easy

[LeetCode] 532. K-diff Pairs in an Array_Easy tag: Hash Table

[LeetCode] 225. Implement Stack using Queues_Easy tag: Design

[LeetCode] 496. Next Greater Element I_Easy tag: Stack

[LeetCode] 197. Rising Temperature_Easy tag: SQL

[LeetCode] 728. Self Dividing Numbers_Easy tag: Math

[LeetCode] 844. Backspace String Compare_Easy tag: Stack **Two pointers

[LeetCode] 476. Number Complement_Easy tag: Bit Manipulation

[LeetCode] 182. Duplicate Emails_Easy tag: SQL

[LeetCode] 58. Length of Last Word_Easy tag: String

[LeetCode] 867. Transpose Matrix_Easy

[LeetCode] 441. Arranging Coins_Easy tag: Math

[LeetCode] 643. Maximum Average Subarray I_Easy tag: Dynamic Programming(Sliding windows)

[LeetCode] 566. Reshape the Matrix_Easy

[LeetCode] 884. Uncommon Words from Two Sentences_Easy tag: Hash Table

[LeetCode] 455. Assign Cookies_Easy tag: Sort

[LeetCode] 849. Maximize Distance to Closest Person_Easy tag: BFS

[LeetCode] 581. Shortest Unsorted Continuous Subarray_Easy tag: Sort, Stack

[LeetCode] 709. To Lower Case_Easy

[LeetCode] 696. Count Binary Substrings_Easy

[LeetCode] 414. Third Maximum Number_Easy

[LeetCode] 744. Find Smallest Letter Greater Than Target_Easy tag: **Binary Search

[LeetCode] 596. Classes More Than 5 Students_Easy tag:SQL

[LeetCode] 824. Goat Latin_Easy

[LeetCode] 586. Customer Placing the Largest Number of Orders_Easy tag;SQL

[LeetCode] 830. Positions of Large Groups_Easy tag: Two Pointers

[LeetCode] 504. Base 7_Easy tag: Math

[LeetCode] 408. Valid Word Abbreviation_Easy

[LeetCode] 620. Not Boring Movies_Easy tag: SQL

[LeetCode] 788. Rotated Digits_Easy tag: **Dynamic Programming

[LeetCode] 876. Middle of the Linked List_Easy tag: Linked List ** slow, fast pointers

[LeetCode] 859. Buddy Strings_Easy

[LeetCode] 860. Lemonade Change_Easy tag: Greedy

[LeetCode] 577. Employee Bonus_Easy tag: SQL

[LeetCode] 868. Binary Gap_Easy

 [LeetCode] 367. Valid Perfect Square_Easy tag:Math

 [LeetCode] 20. Valid Parentheses_Easy tag: Stack

[LeetCode] 661. Image Smoother_Easy

[LeetCode] 598. Range Addition II_Easy tag: Math

[LeetCode] 872. Leaf-Similar Trees_Easy tag: DFS

[LeetCode] 434. Number of Segments in a String_Easy

[LeetCode] 693. Binary Number with Alternating Bits_Easy

[LeetCode] 762. Prime Number of Set Bits in Binary Representation_Easy

[LeetCode] 276. Paint Fence_Easy tag: Dynamic Programming

[LeetCode] 405. Convert a Number to Hexadecimal_Easy tag: Bit Manipulation

[LeetCode] 840. Magic Squares In Grid_Easy

[LeetCode] 747. Largest Number At Least Twice of Others_Easy

[LeetCode] 506. Relative Ranks_Easy tag: Sort

[LeetCode] 607. Sales Person_Easy tag: SQL

[LeetCode] 603. Consecutive Available Seats_Easy tag: SQL

[LeetCode] 584. Find Customer Referee_Easy tag: SQL

[LeetCode] 619. Biggest Single Number_Easy tag: SQL

[LeetCode] 492. Construct the Rectangle_Easy tag: Math

[LeetCode] 422. Valid Word Square_Easy

[LeetCode] 613. Shortest Distance in a Line_Easy tag: SQL

[LeetCode] 610. Triangle Judgement_Easy tag: SQL

[LeetCode] 704. Binary Search_Easy tag: Binary Search   2

[LeetCode] 374. Guess Number Higher or Lower_Easy tag: Binary Search   2

[LintCode] 61. Search for a Range_Easy tag: Binary Search   2

LeetCode] 35. Search Insert Position_Easy tag: Binary Search   2    

[LeetCode] 278. First Bad Version_Easy tag: Binary Search      1

[LeetCode] 162. Find Peak Element(852. Peak Index in a Mountain Array)_Medium tag: Binary Search     2

[LeetCode] 74. Search a 2D Matrix_Medium tag: Binary Search   2

[LeetCode] 240. Search a 2D Matrix II_Medium tag: Binary Search   1

[LeetCode] 69. Sqrt(x)_Easy tag: Binary Search  1

[LeetCode] 153. Find Minimum in Rotated Sorted Array_Medium tag: Binary Search   2

[LeetCode] 154. Find Minimum in Rotated Sorted Array II_Hard

[LeetCode] 78. Subsets tag: backtracking

[LeetCode] 90.Subsets II tag: backtracking

[LeetCode] 33. Search in Rotated Sorted Array_Medium tag: Binary Search   

[LeetCode] 702. Search in a Sorted Array of Unknown Size_Medium tag: Binary Search

[LeetCode] 236. Lowest Common Ancestor of a Binary Tree_ Medium tag: DFS, Divide and conquer

[LeetCode] 120. Triangle _Medium tag: Dynamic Programming

[LeetCode] 63. Unique Paths II_ Medium tag: Dynamic Programming

[LeetCode] 70. Climbing Stairs_ Easy tag: Dynamic Programming

[LeetCode] 55. Jump Game_ Medium tag: Dynamic Programming

[LeetCode] 45. Jump Game II_ Hard tag: Dynamic Programming

[LeetCode] 132. Palindrome Partitioning II_ Hard tag: Dynamic Programming

[LeetCode] 139. Word Break_ Medium tag: Dynamic Programming

[LintCode] 77. Longest common subsequences_ Medium tag: Dynamic Programming

[LeetCode] 115. Distinct Subsequences_ Hard tag: Dynamic Programming

[LeetCode] 97. Interleaving String_ Hard tag: Dynamic Programming

[LeetCode] 206. Reverse Linked List_Easy tag: Linked List

[LeetCode] 83. Remove Duplicates from Sorted List_Easy tag: Linked List

[LeetCode] 82. Remove Duplicates from Sorted List II_Medium tag: Linked List

[LeetCode] 92. Reverse Linked List II_Medium tag: Linked List

[LeetCode] 86. Partition List_Medium tag: Linked List

[LeetCode] 876. Middle of the Linked List_Easy tag: Linked List

[LeetCode] 21. Merge Two Sorted Lists_Easy tag: Linked List

[LeetCode] 148. Sort List_Middle tag: Linked List

[LeetCode] 143. Reorder List_Middle tag: Linked List

[LeetCode] 23. Merge k Sorted Lists_Hard tag: Linked List

[LeetCode] 138. Copy List with Random Pointer_Medium tag: Linked List

[LeetCode] 109. Convert Sorted List to Binary Search Tree_Medium tag: Linked List

[LeetCode] 234. Palindrome Linked List_Easy tag: Linked List

[LeetCode] 189. Rotate Array_Easy tag: Array

[LeetCode] 4. Median of Two Sorted Arrays_Hard tag: Array

[LeetCode] 15. 3Sum_Medium tag: Array

[LeetCode] 75. Sort Colors_Medium tag: Two pointers

[LeetCode] 155. Min Stack_Easy tag: stack

[LeetCode] 232. Implement Queue using Stacks_Easy tag: stack

[LeetCode] 84. Largest Rectangle in Histogram_Hard tag: stack

[LeetCode] 654. Maximum Binary Tree_Medium tag: stack

[LeetCode] 128. Longest Consecutive Sequence_Hard tag: Hash

[LeetCode] 146. LRU Cache_Hard tag: Hash, Linked List

[LeetCode] 46. Permutations_Medium tag: DFS, backtracking

[LeetCode] 47. Permutations II_Medium tag: DFS, backtracking

[LeetCode] 51. N-Queens_Hard tag: DFS, backtracking

[LeetCode] 52. N-QueensII_Hard tag: DFS, backtracking

[LeetCode] 131. Palindrome Partitioning_Medium tag: DFS, backtracking, Palindrome

[LeetCode] 40. Combination Sum II_Medium tag: backtracking

[LeetCode] 39. Combination Sum_Medium tag: backtracking

[LeetCode] 126. Word Ladder II_Hard tag: BFS&DFS

[LeetCode] 167. Two Sum II - Input array is sorted_Easy tag: Hash/Two pointers

[LeetCode] 611. Valid Triangle Number_Medium tag: Two pointers

[LeetCode] 16. 3Sum Closest_Medium tag: Array, Two pointers

[LeetCode] 407. Trapping Rain Water II_hard tag: Heap

[LeetCode] 295. Find Median from Data Stream_hard tag: Heap Need to update the follow up question?

[LeetCode] 239. Sliding Window Maximum_Hard tag: deque

[LeetCode] 87. Scramble String_hard tag: 区间Dynamic Programming?

[LeetCode] 416. Partition Equal Subset Sum_Medium tag: backpack

[LeetCode] 322. Coin Change_Medium tag: backpack

[LeetCode] 93. Restore IP Addresses_Medium tag: backtracking

 

转载于:https://www.cnblogs.com/Johnsonxiong/p/9434411.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: LeetCode是一种流行的在线刷题平台,提供了许多算法和数据结构挑战,旨在帮助程序员和计算机科学家提高他们的编程技能。以下是几个LeetCode题目及其答案: 1. 两数之和 题目描述:给定一个整数数组和一个目标值,找出数组中的两个数,它们相加等于目标值。假设每个输入只对应一种答案,并且不能使用相同的元素。 答案:遍历数组,将每个数字存储到一个哈希表中,同时计算出目标值与当前数字的差值。如果差值在哈希表中,则返回这两个数字的索引。时间复杂度为O(n)。 2. 盛最多水的容器 题目描述:给定n个非负整数a1,a2,...,an,其中每个点(i,ai)表示一个坐标。画n条垂直线,使得线i的两个端点在(i,ai)和(i,0)上。找到两条线,它们与x轴一起构成一个容器,使得容器中包含最多水。 答案:使用双指针法,分别指向数组的头部和尾部。每次计算当前容器的大小,然后根据容器两侧的高度差决定是否移动指针。时间复杂度为O(n)。 3. 无重复字符的最长子串 题目描述:给定一个字符串,请找出其中不含有重复字符的最长子串的长度。 答案:使用双指针法,分别指向子串的起始和结束位置。每次判断当前字符是否存在于子串中,如果存在,则移动起始指针到重复字符的下一个位置,否则移动结束指针。同时记录最长子串的长度。时间复杂度为O(n)。 上述题目只是LeetCode中的部分题目,不同的题目需要采用不同的算法和数据结构进行解决。通过刷LeetCode和其他类似的在线刷题平台,可以提高编程能力和算法思维能力,使得程序员更加熟练地处理各种算法问题。 ### 回答2: LeetCode是一个在线的编程题库,提供了各种不同难度和类型的编程题目。这些题目主要涵盖了算法、数据结构、字符串操作、图算法等方面的内容。 每道题目都有一个独特的编号和描述,通过阅读题目可以了解到输入和输出的形式,以及题目的具体要求。解答题目通常需要理解问题的本质,设计相应的算法,编写代码实现,并进行测试验证。 题目的难度分为简单、中等和困难三个级别,根据不同的难度以及自己的编程能力,可以选择相应的题目来挑战。 解答题目的关键在于理解问题的本质,分析解决问题的思路,并设计合适的算法实现。这个过程需要对常见的算法和数据结构有一定的了解,比如动态规划、贪心算法、递归、队列等。 对于每一道题目LeetCode提供了多种语言的代码模板,如C++、Java、Python等,可以根据自己的编程习惯和喜好选择相应的语言进行代码编写。 解答题目的过程中需要注意代码的效率和正确性,特别是对于大规模输入的情况,需要考虑时间和空间复杂度。在完成代码编写后,还需要进行测试验证,确保程序的正确性。 在解答题目过程中,可以参考其他人的解题思路和代码实现,并进行对比和学习。LeetCode还提供了题目的讨论区,可以与其他的编程爱好者交流和分享经验。 总之,通过LeetCode可以提升自己的编程能力,加深对算法和数据结构的理解,并为面试和竞赛积累经验。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值