leetcode top 100 题目汇总
首先表达我对leetcode网站的感谢,与高校的OJ系统相比,leetcode上面的题目更贴近工作的需要,而且支持的语言广泛。对于一些比较困难的题目,可以从讨论区中学习别人的思路,这一点很方便。
经过一段时间的练习,我感觉自己的算法水平还是有很大的提升的。与学校开的算法导论的课程相比,我觉得实实在在的做题,比学习理论更符合我的认知方式。可能我属于那种脑子记不住,但是可以用“肌肉”去记忆的类型吧。
在做题的时候,我会尝试用感觉好玩的语言来写。如果把做题当成一种解谜游戏的话,那语言就是玩这个游戏选择的一个“职业”或者“角色”吧。每种语言都有自己的特色,喜欢哪个就用哪个。我会经常换换不同的口味,虽然写出来的代码奇形怪状,但是挺有意思的。
下面就是leetcode上的top 100题目的解答,原题目的链接是:https://leetcode.com/problemset/top-100-liked-questions/。
有些题目是参考别人的,但是未必有引用地址,如果哪位对内容有异议,可以给我留言。
整理这个列表,主要是用于我自己的总结,其中有些题目的代码还比较粗糙,我会抽时间回顾一下,不断的完善,也给有缘看到我的文章的朋友,提供一些方便。
1 Two Sum 42.20% Easy
2 Add Two Numbers 30.70% Medium
3 Longest Substring Without Repeating Characters 28.00% Medium
4 Median of Two Sorted Arrays 25.60% Hard
5 Longest Palindromic Substring 26.70% Medium
10 Regular Expression Matching 25.00% Hard
11 Container With Most Water 42.80% Medium
15 3Sum 23.50% Medium
17 Letter Combinations of a Phone Number 40.50% Medium
19 Remove Nth Node From End of List 34.00% Medium
20 Valid Parentheses 36.00% Easy
21 Merge Two Sorted Lists 46.00% Easy
22 Generate Parentheses 53.30% Medium
23 Merge k Sorted Lists 33.10% Hard
31 Next Permutation 30.10% Medium
32 Longest Valid Parentheses 25.00% Hard
33 Search in Rotated Sorted Array 32.70% Medium
34 Find First and Last Position of Element in Sorted Array 33.00% Medium
39 Combination Sum 46.90% Medium
42 Trapping Rain Water 42.00% Hard
46 Permutations 53.60% Medium
48 Rotate Image 47.00% Medium
49 Group Anagrams 45.00% Medium
53 Maximum Subarray 42.90% Easy
55 Jump Game 31.40% Medium
56 Merge Intervals 34.90% Medium
62 Unique Paths 46.50% Medium
64 Minimum Path Sum 45.70% Medium
70 Climbing Stairs 43.50% Easy
72 Edit Distance 36.50% Hard
75 Sort Colors 41.40% Medium
76 Minimum Window Substring 29.90% Hard
78 Subsets 51.20% Medium
79 Word Search 30.50% Medium
84 Largest Rectangle in Histogram 30.30% Hard
85 Maximal Rectangle 32.50% Hard
94 Binary Tree Inorder Traversal 55.20% Medium
96 Unique Binary Search Trees 45.20% Medium
98 Validate Binary Search Tree 25.30% Medium
101 Symmetric Tree 42.80% Easy
102 Binary Tree Level Order Traversal 47.20% Medium
104 Maximum Depth of Binary Tree 59.30% Easy
105 Construct Binary Tree from Preorder and Inorder Traversal 39.60% Medium
114 Flatten Binary Tree to Linked List 41.20% Medium
121 Best Time to Buy and Sell Stock 46.30% Easy
124 Binary Tree Maximum Path Sum 29.40% Hard
128 Longest Consecutive Sequence 41.00% Hard
136 Single Number 59.10% Easy
139 Word Break 34.40% Medium
141 Linked List Cycle 35.90% Easy
142 Linked List Cycle II 31.00% Medium
146 LRU Cache 24.20% Hard
148 Sort List 34.10% Medium
152 Maximum Product Subarray 28.60% Medium
155 Min Stack 35.80% Easy
160 Intersection of Two Linked Lists 32.40% Easy
169 Majority Element 51.60% Easy
198 House Robber 40.80% Easy
200 Number of Islands 40.40% Medium
206 Reverse Linked List 52.90% Easy
207 Course Schedule 36.80% Medium
208 Implement Trie (Prefix Tree) 36.90% Medium
215 Kth Largest Element in an Array 46.20% Medium
221 Maximal Square 32.30% Medium
226 Invert Binary Tree 57.10% Easy
234 Palindrome Linked List 35.40% Easy
236 Lowest Common Ancestor of a Binary Tree 35.60% Medium
238 Product of Array Except Self 54.00% Medium
239 Sliding Window Maximum 37.20% Hard
240 Search a 2D Matrix II 40.30% Medium
253 Meeting Rooms II 42.30% Medium
279 Perfect Squares 41.00% Medium
283 Move Zeroes 53.70% Easy
287 Find the Duplicate Number 48.50% Medium
297 Serialize and Deserialize Binary Tree 39.50% Hard
300 Longest Increasing Subsequence 40.30% Medium
301 Remove Invalid Parentheses 38.50% Hard
309 Best Time to Buy and Sell Stock with Cooldown 43.50% Medium
312 Burst Balloons 46.40% Hard
322 Coin Change 29.20% Medium
337 House Robber III 47.40% Medium
338 Counting Bits 64.00% Medium
347 Top K Frequent Elements 53.60% Medium
394 Decode String 44.00% Medium
406 Queue Reconstruction by Height 59.00% Medium
416 Partition Equal Subset Sum 40.00% Medium
437 Path Sum III 42.00% Easy
438 Find All Anagrams in a String 36.50% Easy
448 Find All Numbers Disappeared in an Array 52.80% Easy
461 Hamming Distance 70.10% Easy
494 Target Sum 44.90% Medium
538 Convert BST to Greater Tree 50.00% Easy
543 Diameter of Binary Tree 46.20% Easy
560 Subarray Sum Equals K 41.70% Medium
581 Shortest Unsorted Continuous Subarray 29.60% Easy
617 Merge Two Binary Trees 69.30% Easy
621 Task Scheduler 44.50% Medium
647 Palindromic Substrings 56.00% Medium
739 Daily Temperatures 59.80% Medium
771 Jewels and Stones 83.00% Easy
leetcode top 100 题目汇总的更多相关文章
- [LeetCode] Top 100 Liked Questions
[LeetCode] Top 100 Liked Questions # Title Acceptance Difficulty 1 Two Sum 38.80% Easy 2 Add Two Num ...
- leetcode - 位运算题目汇总(下)
接上文leetcode - 位运算题目汇总(上),继续来切leetcode中Bit Manipulation下的题目. Bitwise AND of Numbers Range 给出一个范围,[m, ...
- LeetCode Top 100 Liked 点赞最高的 100 道算法题
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 公众号:负雪明烛 本文关键词:刷题顺序,刷题路径,好题,top100,怎么刷题,Leet ...
- All LeetCode Questions List 题目汇总
All LeetCode Questions List(Part of Answers, still updating) 题目汇总及部分答案(持续更新中) Leetcode problems clas ...
- leetcode - 位运算题目汇总(上)
最近在看位运算的知识,十分感叹于位运算的博大精深,正好leetcode有 Bit Manipulation 的专题,正好拿来练练手. Subsets 给出一个由不同的数字组成的数组,枚举它的子数组(子 ...
- LeetCode Top 100 Liked Questions in Golang(updating...)
leetcode go语言版本,主要为了熟悉下语言 1. Two Sum 双指针版本, O(NlogN) func twoSum(nums []int, target int) []int { val ...
- LeetCode面试常见100题( TOP 100 Liked Questions)
LeetCode面试常见100题( TOP 100 Liked Questions) 置顶 2018年07月16日 11:25:22 lanyu_01 阅读数 9704更多 分类专栏: 面试编程题真题 ...
- LeetCode高频题目(100)汇总-Java实现
LeetCode高频题目(100)汇总-Java实现 LeetCode高频题目(100)汇总-Java实现 目录 第01-50题 [Leetcode-easy-1] Two Sum [Le ...
- LeetCode 11月第2周题目汇总
开源地址:点击该链接 前言 最近比较忙,这周几乎没有刷题,只刷了6道题~ 题目汇总 0387_first_unique_character_in_a_string类似的题目比较多了,字符串中找出特别的 ...
随机推荐
- c# AutoMapper 使用方式和再封装
安装方式:使用vs自带的nuget管理工具,搜索AutoMapper ,选择第一个安装到你的项目即可. 我从网上找了一些资料, 参考网址:http://blog.csdn.net/csethcrm/a ...
- 我发起了一个 用 C# 写 的 浏览器 开源项目 HtmlCore
我之前还发起过一个 项目, 名字也叫 HtmlCore, 见 <我发起了一个 .Net 开源 跨平台 GUI (界面开发框架)项目 HtmlCore> https://www.cnblo ...
- Flutter 常用命令
Flutter 常用命令: Flutter 常用命令 说明 flutter 列出所有的命令 flutter help 查看具体命令的帮助信息 flutter doctor 查看是否还需要安装其它依赖 ...
- ionic3使用echarts
1.安装typings及echarts npm install typings echarts --global 2.安装 ECharts 的 TypeScript 定义文件 npm install ...
- refreshContext(context)方法源码探究
该方法目的是刷新应用上下文,是容器启动最主要的方法,其实现是一个模板方法,内容巨大,所以先看模板方法都做了哪些事,然后再细看每个方法的实现机制. refreshContext(context)方法首先 ...
- 【linux】之日志查看
搜索日志 -n 显示行号 grep 1570xxxx -n callback.tomcat-catalina-out 显示从第多少行~多少行 sed -n '464913,465020p' callb ...
- Nginx的编译安装及选项
编译安装Nginx1.安装常见的工具和库(GCC.PCRE.zlib.OpenSSL) Nginx是一个由C语言编写的,所以需要一个编译工具如GNU的GCC[root@www ~]# yum inst ...
- Indent Guides插件格式代码
vs开发工具实用性插件 一. 在开发遇到过很多括号缩近的,很是头疼,于是上网收了一下,希望对大家有所帮助. 第一款插件:Indent Guides 这款插件是给代码块增长对齐线,以标识匹配的花括号 ...
- MFC如何添加背景图片
1.在xxDlg.h中定义CBrush m_brush 2.在对话框的消息响应中添加一个ON_WM_CTLCOLOR消息响应 3.添加背景图(方法前一篇随笔有讲到) 4.OnCtlColor消息响应函 ...
- web前端基础学习路线
1.HTML和CSS的基础知识,完成网页的初步设计 2.JavaScript基础知识和DOM.BOM的学习 3.前端基础框架:CSS框架Bootstrap.JavaScript框架jquery的熟悉使 ...