Essential Guide to Algorithms and Data Structures in CS312
Understand algorithms and data structures with this guide. Learn their importance, evaluation methods, common types, and implementation techniques. Explore course resources and administrative details to excel in CS312.
Essential Guide to Algorithms and Data Structures in CS312
E N D
Presentation Transcript
CS312Algorithms Sami Rollins srollins@mtholyoke.edu Spring 2006
Introduction • What is an algorithm? • Why study algorithms? • How do you evaluate an algorithm?
Administrative Information • Course Website • Syllabus • Academic Dishonesty • Calendar http://www.mtholyoke.edu/courses/srollins/cs312/
Data Structures • What is a data structure? • “a scheme for organizing related pieces of information.“ -http://www.webopedia.com/TERM/D/data_structure.html • Typically describes the operations which can be performed on the data and/or how data are organized to support those operations • Example data structures? • Array? • Linked list?
Common Data Structures • Stacks – Last In First Out (LIFO) • Insert on top • Remove top element • Queues – First In First Out (FIFO) • Insert at end • Remove from beginning • Trees - Hierarchy • Root • Parent • Children
Choosing a Data Structure • When would you use a… • Stack? • Queue? • Tree?
Implementing Data Structures • How would you implement a… • Stack? • Queue? • Tree?