Java: the difference between collections and “data structures”
In Java, I don't understand the relationship between sets and "data structures" In my opinion, set refers to list, set, map and queue, and "data structure" refers to the data structure used to implement set, such as array, linked list or tree For example, ArrayList and LinkedList are collections, but their data structures are an array and a linked list respectively Am I right or am I confused?
Solution
A data structure is how data in memory represents content How a collection is accessed I emphasize the word "can"
If you store data in a LinkedList and sort it, performance will degrade If the same algorithm uses ArrayList, its performance will be enhanced As long as you change the way it behaves in memory, it will contribute to various factors
You can use the set representation to access it, or you can use the index to access data You can also go to getfirst, GetNext, getprev
Confusion between your internal storage and storage access Separate 2