Pages

Introduction

Introduction

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.
This article, along with the other examples in this section focuses on the essentials of data structures and algorithms. Attempts will be made to understand how they work, which structure or algorithm is best in a particular situation in an easy to understand environment.

Data Structures and 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 StructureAdvantagesDisadvantages
ArrayQuick inserts
Fast access if index known<
Slow search
Slow deletes
Fixed size
Ordered ArrayFaster search than unsorted arraySlow inserts
Slow deletes
Fixed size
StackLast-in, first-out accesSlow access to other items
QueueFirst-in, first-out accessSlow access to other items
Linked ListQuick inserts
Quick deletes
Slow search
Binary TreeQuick search
Quick inserts
Quick deletes
(If the tree remains balanced)
Deletion algorithm is complex
Red-Black TreeQuick search
Quick inserts
Quick deletes
(Tree always remains balanced)
Complex to implement
2-3-4 TreeQuick search
Quick inserts
Quick deletes
(Tree always remains balanced)
(Similar trees good for disk storage)
Complex to implement
Hash TableVery fast access if key is known
Quick inserts
Slow deletes
Access slow if key is not known
Inefficient memory usage
Heap
Quick inserts
Quick deletes
Access to largest item
Slow access to other items
GraphBest models real-world situationsSome algorithms are slow and very complex

0 التعليقات:

Post a Comment