Data Structure

 A data structure is a way of organizing and storing data in a computer's memory so that it can be used efficiently. It defines a set of rules for how data can be stored and accessed. The choice of a data structure depends on the nature of the data, the operations that need to be performed, and the efficiency requirements.

Linear data structure is the arranging data in a sequential manner. Arrays, LinkedList, Stack and Queue are linear data structures. In these data structures one element is connected to only one another element in a linear form.

Non-linear data structure is arranging data in random order. Here one element is connected to n number of elements. Tree and graph are non linear data structure.



Comments

Popular posts from this blog

Transform values with a stream

Collections Framework

Inspect a collection