0% found this document useful (0 votes)
44 views

Recommended Books

The document discusses recommended textbooks for learning data structures and algorithms in C++. It provides titles and authors for recommended textbooks on data structures, reference textbooks, and classic data structure textbooks.

Uploaded by

nouraiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
0% found this document useful (0 votes)
44 views

Recommended Books

The document discusses recommended textbooks for learning data structures and algorithms in C++. It provides titles and authors for recommended textbooks on data structures, reference textbooks, and classic data structure textbooks.

Uploaded by

nouraiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
You are on page 1/ 24

Text Books

 Recommended Books
 Data Structures Using C++, By Author :D.S.Malik
 C++ Plus Data Structures Fifth Edition, Nell B. Dale
(Author)
 Data Structures and Algorithms Analysis in C++, 3rd
edition, by Mark Allen Weiss

 Reference Books
 Data Structures and Algorithms in C++, 2ndEdition,
Author: Micheal T. Goodrich, Roberto Tamassia and
David Mount John Wiley and Sons, Inc
 Classic Data Structures, BySamanta Debasis(Author)

Thursday, March 28, 2019 1


 

What is Data Structure?


 In computer science , a data structure is a
particular way of storing and
organizing data in a computer so that it can be
used efficiently. Different kinds of data
structures are suited to different kinds of
applications, and some are highly specialized
to specific tasks.
 The basic types of data structures include:
 Files, lists, arrays, records, trees, tables, graphs
 Each of these basic structures has many variations
and allows different operations to be performed on
the data.

Thursday, March 28, 2019 2


What is Algorithm?
 An algorithm is a generic, step-by-step list of
instructions for solving a problem. It is a
method for solving any instance of the
problem such that given a particular input,
the algorithm produces the desired result. A
program, on the other hand, is an algorithm
that has been encoded into some
programming language. There may be many
programs for the same algorithm, depending
on the programmer and the programming
language being used.
Thursday, March 28, 2019 3
Need for Data Structures
 Data structures organize data 
more efficient programs.
 More powerful computers  more
complex applications.
 More complex applications
demand more calculations.
Need for Data Structures
 Data structures organize data 
more efficient programs.
 More powerful computers  more
complex applications.
 More complex applications
demand more calculations.
Need for Data Structures
 Data structures organize data 
more efficient programs.
 More powerful computers  more
complex applications.
 More complex applications
demand more calculations.
Organizing Data
 Any organization for a collection
of records that can be searched,
processed in any order, or
modified.
 The choice of data structure and
algorithm can make the difference
between a program running in a
few seconds or many days.
Organizing Data
 Any organization for a collection
of records that can be searched,
processed in any order, or
modified.
 The choice of data structure and
algorithm can make the difference
between a program running in a
few seconds or many days.
Efficiency
 A solution is said to be efficient if
it solves the problem within its
resource constraints.
 Space
 Time

 The cost of a solution is the


amount of resources that the
solution consumes.
Selecting a Data
Structure
Select a data structure as follows:
1. Analyze the problem to determine
the resource constraints a solution
must meet.
2. Determine the basic operations
that must be supported. Quantify
the resource constraints for each
operation.
3. Select the data structure that best
meets these requirements.
Selecting a Data
Structure
Select a data structure as follows:
1. Analyze the problem to determine
the resource constraints a solution
must meet.
2. Determine the basic operations
that must be supported. Quantify
the resource constraints for each
operation.
3. Select the data structure that best
meets these requirements.
Some Questions to Ask
 Are all data inserted into the data
structure at the beginning, or are
insertions interspersed with other
operations?
 Can data be deleted?
 Are all data processed in some
well-defined order, or is random
access allowed?
Some Questions to Ask
 Are all data inserted into the data
structure at the beginning, or are
insertions interspersed with other
operations?
 Can data be deleted?
 Are all data processed in some
well-defined order, or is random
access allowed?
Some Questions to Ask
 Are all data inserted into the data
structure at the beginning, or are
insertions interspersed with other
operations?
 Can data be deleted?
 Are all data processed in some
well-defined order, or is random
access allowed?
Data Structure Philosophy
 Each data structure has costs and
benefits.
 Rarely is one data structure better
than another in all situations.
 A data structure requires:
 space for each data item it stores,
 time to perform each basic operation,

 programming effort.
Data Structure Philosophy
 Each data structure has costs and
benefits.
 Rarely is one data structure better
than another in all situations.
 A data structure requires:
 space for each data item it stores,
 time to perform each basic operation,

 programming effort.
Data Structure Philosophy
 Each data structure has costs and
benefits.
 Rarely is one data structure better
than another in all situations.
 A data structure requires:
 space for each data item it stores,
 time to perform each basic operation,

 programming effort.
Memory Organization
 The memory that communicates directly
with CPU is called main memory.
 Devices that provides backup storage are
called secondary memory.
 Only program and data currently needed
by the processor resides in main memory.
 All other information is stored in auxiliary
(secondary) memory and transferred to
main memory when needed.

Thursday, March 28, 2019 18


Memory Organization…

Thursday, March 28, 2019 19


Memory Organization…
 Memory is divided into fixed-size units called
cells, and each cell is associated with unique
identifier called an address. These addresses
are the unsigned integers 0, 1, 2,……MAX.
 All access to memory are to a specified
address, and we must always fetch or store
complete cell-that is, all the bits in that cell.
The cell is the minimum unit of access.
 The time it takes to fetch or store the contents
of a cell is the same for all the cells in
memory.

Thursday, March 28, 2019 20


Memory Organization…

Thursday, March 28, 2019 21


Goals of this Course
1. Reinforce the concept that costs and
benefits exist for every data structure.

2. Learn the commonly used data


structures.

3. Understand how to measure the cost


of a data structure or program.
 These techniques also allow you to judge
the merits of new data structures that you
or others might invent.
Goals of this Course
1. Reinforce the concept that costs and
benefits exist for every data structure.

2. Learn the commonly used data


structures.

3. Understand how to measure the cost


of a data structure or program.
 These techniques also allow you to judge
the merits of new data structures that you
or others might invent.
The END

Question and Answer

Thursday, March 28, 2019 24

You might also like