2 ms·
I don’t think Ruby or Python have linked lists, only arrays.
by kayodelycaon 5y ago
I don’t think Ruby or Python have linked lists, only arrays.
- skneko 5y agoArrayList is not a linked list, it's an array-backed list like List in C# or other languages, like the name implies. Linked list is `java.util.LinkedList`.
- mattnewton 5y agoRuby and python only have an equivalent to Java’s “array list.” It’s not in the standard library, but you can trivially make linked list nodes yourself if the problem calls for it; I don’t remember encountering a need for the data structure over the built in array-list type outside of interview questions anyways.