whobar
Joined 8 years ago
Joined 8 years ago
Quicksort - pivot - i <= hi mergesort - merge - auxiliary array
When I started practicing DSA, I would code these algorithms from scratch ever week, to try and memorize them. Then as I did more general leetcoding, I realized that these are just solutions to problems, and there's no need to memorize the code exactly, just knowing the key idea is enough.
People dump on leetcode because they think it's memorizing solutions to problems, but it's not practical to do that. It's more like memorizing one sentence per problem, than memorizing a page of code. And when you see a new problem, you just adapt one of the "sentences" you memorized for a similar problem.
But if you've never looked at an efficient algorithm for dependency resolution, it's going to be impossible to come up with a good solution for a related problem in an interview.
Because they pay massive salaries, at the same level of the other companies.
> having 500 tabs open in mobile Safari, which I always do, doesn’t hurt my system performance at all because the tabs are freeze-dried when I’m not using them.
When you have so many open tabs, there's no difference between a "freeze dried" tab, and just an entry in your browser's history. If your system performance on desktop is hurt by having 37 windows open, the solution is to just close all these windows. I guarantee you're not going to miss them.
Realistically, malware only affects a tiny fraction of users, and only a further tiny fraction suffer demonstrable loss from it.
You may be better off grinding coarser, and not skipping the initial "bloom" phase. When not simply dumping water into the brewer, there are of course many other variables to tweak to try and achieve a tasty cup.
Up until 6 months ago, I had read probably 3 books in 10 years. 6 months ago I started reading again.
I started with Rothfuss' Kingkiller Chronicles, books 1 and 2. That set a high bar.
Next was the Dune trilogy after I saw the movie. Overall it was good but a bit heavy for reading before bed, I often didn't manage for more than 30 mins before starting to drift off, whilst with Kingkiller chronicles I could easily read 1+ hours. I gave up on Dune book 3, I'll read it on vacation some time.
Then I tried Ready Player One, which opened up a whole world of realizing that books can be really bad, just like other art forms. I feel like I've never read a bad book before this (despite not reading for 10 years, I did read a lot as a teenager).
The first 25% of the book relies 80s references every other sentence, clearly the writer is trying to nostalgia trip the reader into enjoying it. Then after that he is describing playing a video game. People bemoan how there is a big cultural shift towards watching people play video games, but here is even worse; he describes a super boring boss battle involving an 80s arcade game. Every chapter I read, I got more annoyed at how bad the book was, until I realized I could just abandon it.
And now I just started Sanderson's Mistborn #1: The Final Empire, and it feels good to be reading something quality again.