The first thing, when it comes to the field of Data structures and algorithms is to understand what it means, what are its uses and what are the various careers that you can opt for, with a Knowledge of Data structures and algorithms.
Introduction to Data Structures and Algorithms.
Knowledge of data structures and algorithms is required of people who design and develop computer programs of any kind of systems software or applications software. Before learning about Data structures and algorithms lets us understand what is data.
What is Data??
Data are simply values or set of values. A data item refers to a single unit of values.
What are Data Structures??
A Data structure is an arrangement of data in a computer’s memory or disk. Data structures include Arrays, Stacks, Queues, linked lists, binary trees, and hash tables, and etc.
Data Structure = Organized Data + Allowed Operations.
Characteristics Of Data Structures
Data Structures | Advantages | Disadvantages |
---|---|---|
Array | Quick insertion, very fast access if index known. | Slow search, slow deletion, fixed size. |
Ordered Array | Quicker Search than unsorted Array | Slow insertion and deletion, fixed size. |
Stacks | Provides last-in, first-out access. | Slow access to other items. |
Queue | Provides first-in, first-out access. | Slow access to other items. |
Linked List | Quick insertion, quick deletion. | Slow search. |
Binary Tree | Quick search, insertion, deletion. | Deletion algorithm is Complex. |
Red Black Tree | Quick search, insertion, deletion. Tree always balanced. | Complex |
2-3-4 Tree | Quick search, insertion, deletion. Tree always balanced. Similar trees good for disk storage. | Complex |
Hash Table | Very fast access if key known. Fast insertion. | Slow deletion, access slow if key not known, inefficient memory usage |
Heap | Fast insertion, deletion,access to largest item. | Slow access to other items. |
Data structures Operations
- Traversing: Accessing each record exactly once so that certain items in the record may be processed.
- Searching: Finding the location of the record with a given key value, or finding the locations of all records that satisfy one or more conditions.
- Inserting: Adding a new record to the structure.
- Deleting: Removing a record from the structure