Getting Good At Algorithms: Progress Report #2
What it really means to be good?
Getting good at algorithms boils down to one thing - knowing common tricks to solve problems.
You will face a wide swathe of problems in the big bad world out there. Not all of them will have a clear cut solution.
Coming up with algorithmic solutions is not like solving algebra where there is a clear process to be followed. You cannot follow some procedure to crank out a O(nlogn) solution to any problem.
The ingenious solutions that we currently have mostly come out of nowhere - someone who is spending not lot of their time to solve these specific algorithmic riddles cannot intuit the solution to these problems, such as you when you are in the receiving end of these questions in an interview.
Getting good at algorithms mostly seems to involve knowing as many of these techniques as possible and adapting one or more of them to new problems. But that will only take you so far. That will take you somewhere provided that these problems are developed around the explicit requirement that these specific problems be applied.
Failing that, the only solution that can be applied in a moment's notice is INDEED the one that involves brute force - the one that is the most straightforward one. Spending some time on the problem may open up opportunities to apply one of these algorithms or techniques to the problem at hand. But that may or may not happen.