Posts

Showing posts with the label linear data structures

Basics of Data Structures and Algorithms

Data Structure: Data Structure is a particular way of storing and organizing data in a computer. So, that it can be used efficiently. We can also say in the way of data structure is a special format for organizing and storing data. General data structure types include arrays, files, linked list, stacks, queues, trees, graphs and so on. Depending on the organization of the elements, data structures are classified into two types. Linear Data Structures:  Elements are accessed in a sequential order. But, it not compulsory to store all elements in sequentially. Ex: Linked List, stacks and Queues. Non-Linear Data Structures:  Elements of this data structures are sorted/accessed in a non-linear order. Ex: Trees and Graphs. Algorithms: The formal definition of an algorithm is the step-by-step instructions to solve a given problem. Let us consider the problem of preparing an omelet. For preparing omelet, general steps we follow are: Get the frying pan Get the oil a. ...