0
$\begingroup$

As the question suggests, is it a good idea to teach Data Structure course in Python. Or what be any good rationale for teaching Data Structure course in Python and not in C++.

$\endgroup$
1
  • 5
    $\begingroup$ This would depend more on what your students already know of the languages than anything. What is their primary language now? Or are you a student asking a theoretical question? $\endgroup$ – Buffy Apr 26 at 14:07
4
$\begingroup$

Since we're missing a lot of information, this answer will be fairly bare-bones.

There are no "right" or "wrong" answers here. Everything hinges on the goal of the course. And this is as it should be. Usually, you choose the learning goals for the course, and then choose a language that helps you to achieve them.

If the goal is to understand algorithms and data structures, you would want to work in the language that students would most easily grasp the underlying concepts. Typically, that would point you towards high-level languages that handle garbage collection for you, but it might be a lower-level language if earlier coursework within the program gives students a lot of fluency in a that language. (Garbage collection itself could be studied within an algorithms class, as it's essentially a graphs problem.)

If the goal is to get a lot of practice with direct memory management, then you would certainly want to move towards a lower-level language such as C++. This would come at the expense of some algorithms/data-structures study, but the tradeoff could be considered worthwhile.

It all depends on the outcome the instructor is going for.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.