data structures cs231 instructor: dr. hammad majeed [email protected] office: academic block...
TRANSCRIPT
![Page 2: Data Structures CS231 Instructor: Dr. Hammad Majeed hammad.majeed@niit.edu.pk Office: Academic Block 4 First Floor](https://reader036.vdocuments.us/reader036/viewer/2022083004/56649dc55503460f94ab8786/html5/thumbnails/2.jpg)
Useful Information• Course Web Site: Will be announced soon– All the lectures, projects and assignments will be
published there
• Consulting Hour: Thu 12:00PM-1:00PM • For the submission of the
projects/assignments mydropbox will be used • Detailed info of mydropbox is available at
http://www.niit.edu.pk/%7Eqmr/Students/mydropbox_student.htm
• mydropbox join code is 233mv2b55x56
![Page 3: Data Structures CS231 Instructor: Dr. Hammad Majeed hammad.majeed@niit.edu.pk Office: Academic Block 4 First Floor](https://reader036.vdocuments.us/reader036/viewer/2022083004/56649dc55503460f94ab8786/html5/thumbnails/3.jpg)
Reference Books
• NOTE: There is NO Text Book• Data Structures and Algorithms in C++ --
Second Edition by Adam Drozdek • C++ An Introduction to Data Structures by
Larry Nyhoff• C++ plus Data Structures by Nell Dale and
David Teague• Data Structures and Algorithms by Robert
Lafore
![Page 4: Data Structures CS231 Instructor: Dr. Hammad Majeed hammad.majeed@niit.edu.pk Office: Academic Block 4 First Floor](https://reader036.vdocuments.us/reader036/viewer/2022083004/56649dc55503460f94ab8786/html5/thumbnails/4.jpg)
Marks Distribution and GradingPolicy
• Quizzes (min 6 ) (10%) • One Hour Tests (15% each)• Assignments/Projects (30%)– Projects can be implemented in any language of
your choice• Final Exam (30%)• Grading Policy
• All the quizzes will be unannounced and there will be no makeup quizzes
![Page 5: Data Structures CS231 Instructor: Dr. Hammad Majeed hammad.majeed@niit.edu.pk Office: Academic Block 4 First Floor](https://reader036.vdocuments.us/reader036/viewer/2022083004/56649dc55503460f94ab8786/html5/thumbnails/5.jpg)
Introduction to Data Structures
• What is Data ?– Any useful information – that can be stored or
memorized for future reference• In an organization it can be
– Employee’s name, sex, age, department, address so on• In Railway reservation office
– Passenger name, traveling date, traveling time, seat number so on
• In Computers– Set of integers, Structure(s) or any other user defined data
type
![Page 6: Data Structures CS231 Instructor: Dr. Hammad Majeed hammad.majeed@niit.edu.pk Office: Academic Block 4 First Floor](https://reader036.vdocuments.us/reader036/viewer/2022083004/56649dc55503460f94ab8786/html5/thumbnails/6.jpg)
Abstract Data Types (ADT)
• This is a higher level, domain and operations independent specification of data– While working on an “integer” type we don’t
worry about its low level implementation (can be 32 bit, or 64 bit number)
– Distance = rate * time (rate and time can be of type integer or real numbers)
– Employee record means same to the bosses of two different organizations, no matter how differently they are stored by the admin officers
![Page 7: Data Structures CS231 Instructor: Dr. Hammad Majeed hammad.majeed@niit.edu.pk Office: Academic Block 4 First Floor](https://reader036.vdocuments.us/reader036/viewer/2022083004/56649dc55503460f94ab8786/html5/thumbnails/7.jpg)
Data Structures• Collection of data in an ordered fashion– Ages of the students in a class are all numbers (data),
but once are grouped in one line, one after the other becomes structured data (arrays)
– Age, class, sex, height, weight of a student is all data, but if we place them in one line per student it would be structured data (structures/struct)
– Arrays, list, queues, stack, doubly linked lists, structures etc are all data structures
• Different operations are defined for each type of data structure to add, delete or modify its content
![Page 8: Data Structures CS231 Instructor: Dr. Hammad Majeed hammad.majeed@niit.edu.pk Office: Academic Block 4 First Floor](https://reader036.vdocuments.us/reader036/viewer/2022083004/56649dc55503460f94ab8786/html5/thumbnails/8.jpg)
Algorithms
• The operations defined on the data structures are generally knows as algorithms
• For each data structure there has to be defined algorithms
• Algorithms are normally used to add, delete, modify, sort items of a data structure
• All programming languages are generally equipped with conventional data structures and algorithms.
• New data structures and the algorithms for manipulation can be defined by the user