Chapter
Dynamic Data Structures
From ComputerScienceOne by Dr Chris Bourke
Concepts
- How do you create and populate a two-dimensional integer array?
"This creates a 2-dimensional array of integers with 10 rows and 20 columns. Once created, we can index individual elements by specifying row and column indices.\n\n1 for(int i=0; i<matrix.length; i++
- How do Java lists provide dynamic data structures?
"The Java SDK provides a rich assortment of dynamic data structures as alternatives to arrays including lists, sets and maps. The classes that support and implement these data structures are defined i
- How do Java sets store unordered unique elements?
"Another type of collection supported by the Collections library is a Set. A set differs from a list in that it is unordered. There is no concept of the first element or last element. Moreover, a Set
- How does a Java map store and retrieve key-value pairs?
"Finally, Java also supports a Map data structure which allows you to store key-value pairs. The keys and values can be any object type and are specified by two parameters when you create the map. A c