0 views

Uploaded by Æ Reddy Vïñød

7665rer

- Searching&Sorting
- Cse Iitkgp Ac in Oldlook Syllabus HTML
- 03xxxx
- Paren Lab
- lecture1[1]
- Cpds Previous Papers Questions 2012 Harsha
- Implementation of Sorting Algorithms
- Implementation and Application of Bubble Sort in 2D Array
- InsertionSort With Java
- complex analysis.pdf
- Array Sorting
- 235750
- complexitypython.txt
- ch052
- Introduction
- Seminar
- Runtime complexity analysis for Adaptive sort
- Parameterized Complexity of Quick Sort, Heap Sort and K-sort Algorithms with Quasi Binomial Input
- BC0038 DATA STRUCTURE USING C PAPER 2
- Lecture 5

You are on page 1of 13

1

Course Name : Data Structure (CSI 221)

Course Teacher : Md. Zakir Hossain

Lecturer, Dept. of Computer Science

Stamford University Bangladesh

Thursday : 1:00 pm 2.15 pm

Marks Distribution : Attendance - 10%

Assignment (5%+5%)

Class Test - (10% +10%)

Midterm - 30%

Final - 30%

---------------------------------

Total - 100%

2

Course Outline

1. Concepts and examples

2. Elementary data objects

3. Elementary data structures

4. Arrays

5. Lists

6. Stacks

7. Queues

8. Graphs

9. Trees

10.Sorting and searching

11.Hash techniques

3

Books

1. Theory

and Problems of Data Structures

by Seymour Lipschutz, McGraw-Hill,

ISBN 0-07-038001-5.

4

Elementary Data Organization

Collection of data are frequently organized into a

hierarchy of fields, records and files.

This organization of data may not complex enough to

maintain and efficiently process certain collections of

data.

For this reason, data are organized into more complex

type of structures called Data Structures.

Data Structures

Data Structures

The logical or mathematical model of a particular organization of data is called a data

structure.

Types of Data Structure

1. Linear Data Structure

Example: Arrays, Linked Lists, Stacks, Queues

2. Nonlinear Data Structure

Example: Trees, Graphs

A

Array A B C D E F Tree B C

D E F

6

Choice of Data Structures

The choice of data structures depends on two considerations:

1. It must be rich enough in structure to mirror the actual relationships of data in the

real world.

2. The structure should be simple enough that one can effectively process data when

necessary.

10

20 10

30

40 20 30

50

60

70 40 50 60 70

80

Figure 2: Array with 8 items Figure 3: Tree with 8 nodes

7

Data Structure Operations

1. Traversing: Accessing each record exactly once so that certain items in the

2. Searching: Finding the location of the record with a given key value.

6. Merging: Combing the records in two different sorted files into a single

sorted file.

8

Algorithms

It is a well-defined set of instructions used to solve a particular problem.

Example:

Write an algorithm for finding the location of the largest element of an array Data.

1. set k:=1, Loc:=1 and Max:=Data[1]

2. while k<=N repeat steps 3, 4

3. If Max < Data[k] then Set Loc:=k and Max:=Data[k]

4. Set k:=k+1

5. write: Max and Loc

6. exit

9

Complexity of Algorithms

The complexity of an algorithm M is the function

f(n) which gives the running time and/or storage

space requirement of the algorithm in terms of the

size n of the input data.

1. Time Complexity

2. Space Complexity

10

O-notation

- A function f(n)=O(g(n)) if there are positive constants c and n0 such that

- When f(n)=O(g(n)), it is guaranteed that f(n) grows at a rate no faster than g(n).

Example:

11

Some rules related to asymptotic notation

Rule-1

If fa(n) = O(ga(n)) and fb(n) = O((gb(n)) then

(a) fa(n)+fb(n) = max(O(ga(n)),O(gb(n))

(b) fa(n) * fb(n) = O(ga(n) * gb(n))

Rule-2

If f(n) is a polynomial of degree k, then f(n) = (nk).

Rule-3

Logkn = O(n) for any constant.

12

Typical Growth Rates

Function Name

c Constant

logn Logarithmic

log2n Log-squared

n Linear

nlogn

n2 Quadratic

n3 Cubic

2n Exponential

13

- Searching&SortingUploaded byUdaibhanSingh
- Cse Iitkgp Ac in Oldlook Syllabus HTMLUploaded byvidyasagar
- 03xxxxUploaded byShu Shujaat Lin
- Paren LabUploaded byShobiitaa Krish
- lecture1[1]Uploaded byLoveleen Bhalla
- Cpds Previous Papers Questions 2012 HarshaUploaded byHarsha Vardhan
- Implementation of Sorting AlgorithmsUploaded byDanielErinfolami
- Implementation and Application of Bubble Sort in 2D ArrayUploaded byInternational Journal for Scientific Research and Development - IJSRD
- InsertionSort With JavaUploaded byArpit Gupta
- complex analysis.pdfUploaded bykannika
- Array SortingUploaded byparaagpandey
- 235750Uploaded byJorge Luis Garcia Zuñiga
- complexitypython.txtUploaded bynatalia
- ch052Uploaded byoptimistic_harish
- IntroductionUploaded byZoraizAnimaniacKhan
- SeminarUploaded byVibhor Aggarwal
- Runtime complexity analysis for Adaptive sortUploaded bysamdhk2004
- Parameterized Complexity of Quick Sort, Heap Sort and K-sort Algorithms with Quasi Binomial InputUploaded byRahul Sharma
- BC0038 DATA STRUCTURE USING C PAPER 2Uploaded bySeekEducation
- Lecture 5Uploaded byAbdurrouf
- 10-ArraysAndStrings[1]Uploaded byMia-357
- Sorting CopyUploaded byrywls
- p-versus-np standardUploaded byapi-341925264
- Lecture Notes IncompleteUploaded byfree_prog
- Set 2 External SortingUploaded bySathyaPriya Ramasamy
- Computer Science 2017Uploaded byAsad
- thuat toan k-treeUploaded bydiephtv
- Sorting Bitonic SortUploaded byhonestman_usa
- thesis2[1]Uploaded byLalit Khera
- BptUploaded byjohn

- Chap 13Uploaded bymahaweb
- 13891_story Based Ques3Uploaded byÆ Reddy Vïñød
- 13891 String Prog1Uploaded byÆ Reddy Vïñød
- 17647_chapter6-1Uploaded byÆ Reddy Vïñød
- Ash WithUploaded byÆ Reddy Vïñød
- Practical 3-4 (CSE215)Uploaded byÆ Reddy Vïñød
- Lecture 3 PercentageUploaded byÆ Reddy Vïñød
- MathsUploaded byÆ Reddy Vïñød
- EE601 Basic Electrical and DC Theory (1)Uploaded byÆ Reddy Vïñød
- 17730 5.Lecture 4 5 Functions(Complete)Uploaded byÆ Reddy Vïñød
- Ece Logic FamilesUploaded byÆ Reddy Vïñød
- 11360_MCQs Unit 1Uploaded byÆ Reddy Vïñød
- 11360_MCQs Unit 2 n 3 With AnsUploaded byÆ Reddy Vïñød
- 11360_MCQs Unit 2 n 3 With AnsUploaded byÆ Reddy Vïñød
- autotechavionicsmath_practicetest.pdfUploaded bybiebs038
- Santosh 2612Uploaded byÆ Reddy Vïñød
- 13891 ProgramsUploaded byÆ Reddy Vïñød
- 13891 Mcqs TopicUploaded byÆ Reddy Vïñød
- 419071MCQ matrices ASK .pdfUploaded byÆ Reddy Vïñød
- 419071MCQ matrices ASK .pdfUploaded byÆ Reddy Vïñød
- Assignment IIUploaded byÆ Reddy Vïñød

- Hw03 HandoutUploaded byBatman
- Test Case Minimization TechniquesUploaded byKeshav Rathi
- Resolving the Decision Version of the Directed Hamiltonian Path (Cycle) Problem under Two Special Conditions by Method of Matrix Determinant: An OverviewUploaded byTI Journals Publishing
- Cs 463 Spring 2017 SylUploaded byPetter P
- k-Anonymity modelUploaded byanubhav129
- Static Load Balancing of Parallel Mining Efficient Algorithm with PBEC in Frequent Sequences DatasetUploaded byIRJET Journal
- dfsaUploaded byRaul Edgar Quispe Totocayo
- 302 Data Structure Using C-minUploaded byabhishek
- 10.1.1.39Uploaded byOrtal Elzam
- Cs2251-Design and Analysis of Algorithm 2 MarksUploaded byEssaki Muthu
- kdd00Uploaded bydeadmonkey
- Linear & BinaryUploaded byIzyani Ibrahim
- c++ - Effectively calculate the result of geometric series - CoUploaded byNiko Danu S
- schedUploaded bykumar_mech230
- Estimating CPU TimeUploaded byWencai Lee
- SNDPUploaded byAncd Desa
- 11 ComplexityUploaded bygeorgesmaccario
- Embedded System Design Jan 2014Uploaded byPrasad C M
- gb.pdfUploaded byMerry Sinha
- Exact InterpolationUploaded byheinsteinz
- MELJUN CORTES ALGORITHM Analysis of Algorithm EfficiencyUploaded byMELJUN CORTES, MBA,MPA
- II-Sem SyllUploaded byjsrevathy
- Entropia muestralUploaded byoscar_sm77
- Self-Reference and Computational Complexity Chris LanganUploaded byLecks90
- Perceptrons_algorithm.pdfUploaded byallendoss
- 1505.05637Uploaded byTiffany Stanton
- Ruler Folding problem PaperUploaded byVishnuprakash Puthiyakovilakath
- Assarf, Gawrilow - Computing Convex Hulls [Polymake]Uploaded byalex
- Algo Lecture6Uploaded bymusheermusheer
- 1.1 Basics of Data Structures (1)Uploaded byMugi Pawar