27 ms·
Let's take Euclid's algorithm which gets the greatest common denominator between two given numbers. Euclid was a mathematician and "father of geometry". Accordi
by maps7 7y ago
Let's take Euclid's algorithm which gets the greatest common denominator between two given numbers. Euclid was a mathematician and "father of geometry". According to Wikipedia, the algorithm was improved a long time after he first described it. That means his one wasn't even the best!
Now we have programmers being tested in hour long interviews... how could they come up with this stuff on the spot?
There is a reason why people have to study for tech company interviews. Knowing the solution to a problem that is similar to the one that is being asked will go a long way in the interview.
- rubicon33 7y agoThat's exactly what I'm trying to get at with this post. I initially started my study of algorithms about a week ago, with nearly a decade of professional programming experience under my belt. I quickly realized that expecting myself to find the optimal, or even near-optimal solution, was setting myself up for failure. Yet (hence this post) I wasn't sure if that was the case for other people. I continue to wonder what other people's experiences have been like in the pursuit of algorithm study. Do you find that the intuitive, brute force solution is readily available in your mind, but that you have to "peak" aka "cheat" to find the elegant / right solution? Or are most people finding themselves able to just tackle the problems outright, getting (or nearly getting) the optimal (or nearly optimal) solution on first pass...?
- maps7 7y agoPersonally I am the same as you. My first attempt is never the optimal solution.