In an interview when I ask the recent graduate students that what is the difference between array and linked list, the first answer normally is “In array you have same data types and in the linked list you can have different data types.” When I told them to explain they will say that they have just read it somewhere or that they don’t know exactly how.
I am really failing to understand from where this idea is coming into their brain? Can someone help me to understand why a college graduate thinks this? Or do you think this is really a difference?
In an interview when I ask the recent graduate students that what is the
Share
It is possible that these students have been taught arrays with statically typed languages and linked lists with dynamically typed languages, so they have come to identify the data structure with the paradigm of the language they were using it in.
For instance, they may have used arrays in C and linked lists in Scheme. Or whatever the fashionable names are for today’s languages that are essentially like C, respectively Scheme.