r/leetcode • u/absurdkittie • 20h ago
Intervew Prep Python vs C++ for DSA preparation and Leetcode. Which is the best?
Probably a shitty old question, but asking again to know if there are recent changes in the answer. I'm already solving Leetcode problems in Python (just solved 50+), and today I saw some comments regarding interviewers don't allow Python and shit. So should I really study C++, just for dsa? I'm really running short of time, and have a lot to study. Is learning C++ really needed and worth it?
5
Upvotes
3
u/RaisedByCakes 20h ago
Stick to python.
The only times I’ve been told not to use python is if the job explicitly requires complete fluency in a specific language (eg) typescript, Java, etc.
Your recruiters should be able to confirm.
3
u/salam_hosn 17h ago
Python for sure. Learning C++ is not worth it at all unless u want to do competitive programming
1
u/Legitimate_Air8672 20h ago
Python, u will be focusing more on solving the problem rather than handling syntax issues, and there is not much companies that do not allow python
-2
u/AdministrativeHost15 20h ago
Companies give more respect to C/C++ because it shows you understand the fundamentals e.g. memory allocation.