Introduction to Data structures

Introduction to Data structures

Software engineering is the study of ways in which to create large and complex computer applications and that generally involve many programmers and designers. At the heart of software engineering is with the overall design of the applications and on the creation of a design that is based on the needs and requirements of end users. While software engineering involves the full life cycle of a software project, is includes many different components – specification, requirements gathering, design, verification, coding, testing, quality assurance, user acceptance testing, production, and ongoing maintenance.

Having an in-depth understanding on every component of software engineering is not mandatory, however, it is important to understand that the subject of data structures and algorithms is concerned with the coding phase. The use of data structures and algorithms is the nuts-and-blots used by programmers to store and manipulate data.

Data Structures & Algorithms – Defined

A data structure is an arrangement of data in a computer’s memory or even disk storage. An example of several common data structures are arrays, linked lists, queues, stacks, binary trees, and hash tables. Algorithms, on the other hand, are used to manipulate the data contained in these data structures as in searching and sorting.
Many algorithms apply directly to a specific data structures. When working with certain data structures you need to know how to insert new data, search for a specified item, and deleting a specific item.

Commonly used algorithms include are useful for:
Searching for a particular data item (or record).
Sorting the data. There are many ways to sort data. Simple sorting, Advanced sorting
Iterating through all the items in a data structure. (Visiting each item in turn so as to display it or perform some other action on these items)

Characteristics of Data Structures
Data Structure Pros Cons
Array Quick inserts
Fast access if index known
Slow search
Slow deletes
Fixed size
Ordered Array Faster search than unsorted array Slow inserts
Slow deletes
Fixed size
Stack Last-in, first-out acces Slow access to other items
Queue First-in, first-out access Slow access to other items
Linked List Quick inserts
Quick deletes
Slow search
Binary Tree Quick search
Quick inserts
Quick deletes
(If the tree remains balanced)
Deletion algorithm is complex
Heap Quick inserts
Quick deletes
Access to largest item
Slow access to other items
Graph Best models real-world situations Some algorithms are slow and very complex