C++ Code for Linked List: Adding a Node, Slides of C programming

Description of different data structures

Typology: Slides

2018/2019

Uploaded on 12/08/2019

Lala.mosa
Lala.mosa 🇵🇰

5 documents

1 / 120

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lecture No.01
Data Structures
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download C++ Code for Linked List: Adding a Node and more Slides C programming in PDF only on Docsity!

Lecture No.

Data Structures

Data Structures

 (^) Prepares the students for (and is a prerequisite for) the more advanced material  (^) Cover well-known data structures such as dynamic arrays, linked lists, stacks, queues, tree and graphs.  (^) Implement data structures in C/C++

Data Structures

 (^) Prepares the students for (and is a prerequisite for) the more advanced material  (^) Cover well-known data structures such as dynamic arrays, linked lists, stacks, queues, tree and graphs.  (^) Implement data structures in C/C++

Grading

 (^) Presentation + Assignment +etc 20%  (^) Mid Term 30%  Final 50%  (^) Privileged Marks on basis of class interest, attitude etc 10% to 15% addition in overall

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?

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.