Algorithmic thinking and how did i create AlgoPlus
How i study algorithms and how do i think
I wrote my first algorithm when i was 13, it was 3 lines of code written in a pseudolanguage in Greek, using an online compiler they had at that time. This algorithm was reading 2 integers from the input and returned their sum in the output. I know, magic stuff. But this is where i started. Unfortunately(or fortunately) i grew up on a small island where no one knew anything about algorithms, competitive programming or programming in general, this was the best i could do at that time, to buy a high school level book about programming and read it. Then 3 years passed and i was 16, i was more mature to understand what i have to do to learn something and this was the time i bought the “Introduction to python” book. Till this day python is my 3rd best language, so i don’t know if the book was good or not, the conclusion is that I understood a lot about programming languages. Since then, i always think that algorithms and programming should go together. If an algorithm is not good practically, then i don’t even want to study it. This is why i don’t know how i feel about the people that are studying theoretical computer science, but let’s go back to algorithms and how do i solve a problem. Most of the people i know that are good at algorithms are pretty good at maths too. It’s like a 90% correlation between “good math knowledge” and “good competitive programmer” for my environment. I am pretty good at maths as well, though most of my knowledge is on discrete maths and graph theory. The difference between me and them is that they always think theoretically and then implement what they thought, i am doing the exact opposite, i think how the programming languages and data structures can help me solve the problem first. It’s not like they don’t take that into consideration, but if you compare my code and my uni’s best competitive programer’s code you will see that his solution is much more complex than mine, but for the problems we can both solve. Obviously he can solve a couple more problems than me and maybe this means that my way of thinking is somewhat wrong. What i know for sure is that i am better at implementation and using a programming language. It doesn’t matter how long it will take for me to solve a problem, if it’s not a competition, i will provide the most elegant solution. I knew it since i started and that’s why i always felt better implementing complex data structures from scratch than solving hard dynamic programming problems. Maybe i am not that smart in the end, but i don’t really know. This is what made me create AlgoPlus, my first ever open source project and it’s of course about complex data structures. It contains every single thing i know, i hope i didn’t forget anything to this day, but even if i learn something new, i always go and implement it there immediately. This is my way of learning, i see it and i implement it, at least for data structures, and this was such a win-win situation for me as i both learned and earned github stars to flex on my friends.
Advantages of learning algorithms
With algorithms, i mean competitive programming algorithms and data structures, because everything consists of algorithms(Machine Learning, Blockchain, Computer Networks, etc). Most of the people i know that are good at algorithms worked as ML engineers or something similar. This is what i did as well, my first job was on ML and i currently work as a software engineer(but you can say i do ML stuff mostly). I believe the correlation between “good at algorithms” and “good at ML” is very high as well. I see this almost everyday, people that are good at algorithms usually understand how things work better and the ones that are doing ML for the hype only know how to use Tensorflow and sklearn one liners to implement models. I always say that ML knowledge is not knowing a python library, you have to implement it yourself, from scratch. Well, people bashing me about this as they say that “Come on man, everything is ready, why do i have to implement it to understand it?, i will just study the theory”. Sometimes theory tells you nothing. At my Machine Learning class this semester, if you ask anyone to implement Linear Regression from scratch, they will start creating matrixes and perform complex operations with them, but linear regression is just one loop. Nothing less, nothing more. And this is where the correlation with algorithms is. In order to be a good ML engineer you have to be good at implementation, understsanding and problem solving. You surely need to have these 3 to be good at algorithms as well.