3. INTRODUCTION
• a data structure
• The logical or mathematical model of a particular organization of
data is called a data structure. The data structure is a way of storing
and accessing the data into an acceptable form for computers. So that
a large number of data is processed in a small interval of time. In a
simple way, we say that storing the data into computer memory is
called a data structure.
4. USAGE
1*A software has two parts front end and back end
2*) If data is to be arranged alphabetically or numerically then it is done by sorting
method which is an operation on the data structure.
3*If any software is to be run, at first it is fed into computer memory. In computer
memory jobs are entered into queues. And the queue is also a concept of data
structure.
5. IMPORTANT
• Array, Linked List, Stack, Queues, Searching, Sorting, Tree, Graph…
• Do you have questions that why should I study all the above-complicated stuff if it
has absolutely no use in real life?? Why do companies ask questions related to data
structures and algorithms if it’s not useful in a daily job??
• A lot of beginners and experienced programmers avoid learning Data Structures
and Algorithms because it’s complicated and they think that there is no use of all
the above stuff in real life. So before we discuss the topic we are going to throw a
simple problem at you and you need to find the solution for that.
•
6. FUNDAMENTAL QUESTIONS ABOUT
ALGORITHMS
•
1. What is it supposed to do?
•
2. Does it really do what it is supposed to do?
•
The technical terms normally used for these three aspects are:
•
1. Specification.
•
2. Verification.
• 3. Performance analysis.
7. EXAMPLE
-There are numerous types of data structures, generally built upon simpler primitive data types. Well known
examples are:[10]
1-An array is a number of elements in a specific order, typically all of the same type (depending on the
language, individual elements may either all be forced to be the same type, or may be of almost any type).
Elements are accessed using an integer index to specify which element is required. Typical implementations
allocate contiguous memory words for the elements of arrays (but this is not always a necessity). Arrays may be
fixed-length or resizable.
2-A linked list (also just called list) is a linear collection of data elements of any type, called
nodes, where each node has itself a value, and points to the next node in the linked list. The principal advantage of
a linked list over an array is that values can always be efficiently inserted and removed without relocating the rest
of the list. Certain other operations, such as random access to a certain element, are however slower on lists than
on arrays.
3-A record (also called tuple or struct) is an aggregate data structure. A record is a value that
contains other values, typically in fixed number and sequence and typically indexed by names. The elements of
records are usually called fields or members. In the context of object-oriented programming, records are known as
plain old data structures to distinguish them from objects.[11]
4-Hash tables, graphs and binary trees