Problem Solving with Python


I have been practicing with getting better at solving LeetCode style problems that require use of data structures and algorithms. As the difficulty of the problems start getting harder, the I notice, that very good fluency of programming languages is required to solve the problems in a short period of time. I used C++ as a language of choice since it’s the most familiar to me, but as the difficulty levels of the problems increase, I’ve noticed that the solutions tend to get quite verbose in terms of the code in C++, making debugging more and more difficult. When I compare similar solutions in a programming language such as python, the number of lines of code sometimes reduce by a factor of 10! When the number of lines of code is lesser, debugging is more easier and the solution looks more intuitive in terms of the code. So, I’ve decided to stop using C++ for now and experiment with Python a bit. I am not an expert in the language and using this looks like a good opportunity to get better at Python as well. I’ve decided to give the problems in Advent of Code 2023 a try with Python.


Leave a Reply

Your email address will not be published. Required fields are marked *