What are data structures?
A data structure is a way of storing and unifying data in such a way that operations on that data can be performed in an efficient manner. The data can be stored in several ways. For example, we can have a Person
object that contains a few properties, such as PersonID
and PersonName
, where PersonID
is of the integer type andPersonName
is of thestring type. ThisPerson
object stores the data in memory, and can be further used to save that record in the database. Another example is an array called Countries
of the string
typethat contains a list of countries. We can use the Countries
array to retrieve a country name and use it in a program. Therefore, any type of object that stores data is called a data structure. All primitive types, such as integers, strings, chars, and Booleans, are different types of data structure, whereas other collection types, such as LinkedList
,ArrayList
,SortedList
, and others, are also types of data structure that can store information in exclusive...