which is a better language (C++ or Python) for complex problem solving exercises (ex. Graphs)?
algorithm, c++, graph, python
Solution
I think you're looking for Python, because you can:
- Focus on the algorithms themselves and not have to worry about other detail like memory management.
- Do more with less code
- The syntax is almost like working with pseudo code.
- There is great built in language support for lists, tuples, list comprehensions, etc...
But more specifically...
- If by `better` you mean speed of development, then chose Python.
- If by `better` you mean sheer execution speed, then chose C++.
Problem
I am trying to work on some problems and algorithms. I know C++ but a friend told me that it would be better if done with Python.As it would be much faster to develop and less time is spent in programming details which does not actually earn anything solution wise. EDIT 2: I plan to use python-graph lib from Google-codes, Please provide example codes if you have used it. EDIT 1: faster - less time && less work to code the solution Thank you all for your help !