// To begin with: I for one as an honest man, am always loath at the thought of luring upvotes or making profit from stupid taxes. A few days ago, I saw more than a few zhihuers uttering their disappointment with their informative answers receiving three times as much bookmarks as upvotes. It takes no more than a halfwit to see that lurks are to blame. However, as of the moment of me writing this, this so very brief (hardly more so) summary of Leetcode solutions has around 1k upvotes and 3k bookmarks. Being willing to share things for free requires nothing but a little bit of encouragement and recognition. As such, I recommend those who choose to "bookmark" to add one extra click on the "upvote" button (my sincere despise to all ungrateful lurks), considering the fact that I ain't pushing no ads or charging no fees to nobody. IMO, you don't quite stand a chance against hundreds of Leetcode problems if you lack the strength for a mere "upvote". No bloodsucker, your choice matters.
这是一篇由用户 @朱里 整理的Leetcode题解。就是我。
// This is a memo for Leetcode problem set, by user @朱里. That's me.
// As the number of problems is massive, I'll keep updating this article every once in a while. You don't expect me getting it done overnight, do you?
// Current progress is 567/585.
// 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 think 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?
// So, will Leetcode land me a job after all? Tell you what, just shut the f**k up and do it.
// Life is tough, with or without you asking why.
// 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 seem 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?
// Code repo can be found at zhuli19901106/leetcode-2.
// 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. Without involvement of software engineering, design patterns or modular interface designs, a word-by-word explanation with illustration is totally tedious. Besides, a five-minute kill is not worth a twenty-minute autopsy. A post for every problem solved, serious? Looking to die alone playing Leetcode? There are better things to do for sure.
// Following here is a summary of description and solution for every problem I solved:
// 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.