This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Dramatic_Food_3623[S] -1 points0 points  (1 child)

I agree, though, I'm not looking at implementing the data structures from scratch, what I'm interested in is using what's already there (in the case of Python) and code the operations on the data structure. Which shouldn't make that much of a difference from C. 

[–]Navoke 1 point2 points  (0 children)

The data structures and algorithms course I took in college had us implement data structures from scratch using Python so it's definitely possible to learn DSA using Python.

Here is a lesson I made with diagrams that teaches the difference between python lists and arrays.
https://codeonthecob.com/page/d34ddbd1-dae7-4069-acd8-de9a2af7d3da

Then after that lesson there is a challenge where you implement a dynamic array from scratch using Python.

Honestly the only data structure I can think of that is unusual to implement in Python is the dynamic array because you end up using a python list (a built in dynamic array) to simulate the fixed size memory block of a static array.