Switching to Python from C++ for DSA: A New Chapter
27-01-2025
Why I’m switching to Python for DSA after 1.5 years with C++ and how it fits into my ML and math journey.
After spending 1.5 years solving DSA problems in C++, I’ve decided it’s time to make the switch to Python. C++ has been great—it taught me the nuts and bolts of algorithms and gave me a strong foundation. But now that I’m diving deeper into machine learning and applied mathematics, Python feels like the perfect fit for where I’m headed.
Python’s readability and versatility make it ideal for both DSA and the math-heavy problems I’ve been exploring lately. Sure, it’s slower than C++, but for me, the trade-off is worth it. With libraries like NumPy and pandas, Python bridges the gap between DSA and ML seamlessly.
Here’s my plan: I’ll be solving my entire DSA sheet—the upcoming HashPrep DSA sheet (coming soon!)—in Python. It’s a way to build expertise while keeping my problem-solving skills sharp. Adapting to Python’s dynamic nature and leveraging its built-in features will be a learning curve, but that’s the exciting part.
Switching languages feels like starting fresh, but growth is all about stepping outside your comfort zone. For me, this is just the next step in a journey of continuous learning.
“Progress is impossible without change.” — George Bernard Shaw