Leetcode 简略题解 - 刷题1250 题解567

这是一篇由用户 @朱里 整理的Leetcode题解。就是我。

// This is a memo for Leetcode problem set, by user @朱里. That's me.


// Code repo can be found at zhuli19901106/leetcode-zhuli.


// As the number of problems is huge, I'll keep updating this article every once in a while.


  • 算法 1148/1318
  • 数据库 89/108
  • shell 4/4
  • 并发 9/9


Current progress for interview problems:

  • 1148/1318 for algorithms
  • 89/108 for database
  • 4/4 for shell
  • 9/9 for concurrency



  • 算法567/1318


Current progress for problem reviews

  • 567/1318 for algorithms



// Following here is a summary of description and solution for every problem I solved:

LeetCode 简略题解 - 1~100 - 知乎专栏

LeetCode 简略题解 - 101~200 - 知乎专栏

LeetCode 简略题解 - 201~300 - 知乎专栏

LeetCode 简略题解 - 301~400 - 知乎专栏

LeetCode 简略题解 - 401~500 - 知乎专栏

LeetCode 简略题解 - 501~600 - 知乎专栏

LeetCode 简略题解 - 601~700 - 知乎专栏


// Currently LeetCode is updating problems at a fast and steady pace. The premium problems are unlocked only after payment, so I decide to take my order when there're a hundred or two available. Basically I don't deem the price quite worth, as you usually finish them off in a week while the payment is for a month. Free problems are fine, just no surprise for me anymore after doing five hundreds of them, I guess.


// People tend to waste a lot of time thinking about the meaning of everything. Know what I think? Nothing. No, none, null, void.


// Live, go to school, be young and foolish, get a job, get laid, settle down, give up your dreams, beliefs and hopes, grow up into a nobody, turn old and stubborn, wither and die. What's the point? What's not?


// Among these problems, around 10 were solved after referencing clever solutions from the Internet, the rest were all solved independently. Code was debugged inside my brain or on paper. IDE or compiler were hardly involved.


// In general, readability is what I care more about (compared to code length). Time and space complexity are bottom line. Consistent code style is maintained at best efforts.


// There seems to be inflation in tech interview problems as well (AFAIK prices never go down). Those rated "medium" today are no easier than those rated "hard" in the old days. Harder to make a living, isn't it?


// As for why most problems are walked through by a mere sentence (even a single word), simply put, they're just typical. I think a programmer with proper training should have adequate competence of code reading and adaptability to new languages. The given codes on Github are sufficient for the task of illustration. Minimal hints on the key idea is what I deem tolerable for a real interview. Beyond that, you fail.


// It's just a memo to help fortify comprehension. Ain't no big deal if nobody's reading this.


// Should anyone feel the need for discussion, please leave your comment.


// Change logs are as follows:


// As of the moment 02:25, 2017.3.11, there're altogether 491 problems in the Algorithm section of Leetcode.


// As of the moment 05:02, 2017.3.23, there're altogether 499 problems in the Algorithm section of Leetcode.


// As of the moment 15:01, 2017.4.26, there're altogether 519 problems in the Algorithm section of Leetcode.


// As of the moment 11:13, 2017.5.3, there're altogether 523 problems in the Algorithm section of Leetcode.


// As of the moment 21:08, 2017.5.26, there're altogether 535 problems in the Algorithm section of Leetcode.


// As of the moment 16:52, 2017.6.10, there're altogether 543 problems in the Algorithm section of Leetcode.


// As of the moment 10:33, 2017.8.14, there're altogether 585 problems in the Algorithm section of Leetcode.


// As of the moment 15:27, 2020.3.9, there're altogether 1264 problems in the Algorithm section of Leetcode.


// As of the moment 02:36, 2020.3.26, there're altogether 1277 problems in the Algorithm section of Leetcode, 102 problems in the Database section of Leetcode.

编辑于 05-27