Final exam what weve learned Epilogue 1162020 CSE

  • Slides: 11
Download presentation
Final exam what we’ve learned Epilogue

Final exam what we’ve learned Epilogue

11/6/2020 CSE 250, Fall 2012, SUNY Buffalo, @Hung Q. Ngo 1

11/6/2020 CSE 250, Fall 2012, SUNY Buffalo, @Hung Q. Ngo 1

- Monday Dec 10 8: 00 am— 11: 00 am Cooke … FINAL EXAM

- Monday Dec 10 8: 00 am— 11: 00 am Cooke … FINAL EXAM 11/6/2020 CSE 250, Fall 2012, SUNY Buffalo, @Hung Q. Ngo 2

Format • Open book, open note, no electronic devices • Comprehensive • Same format

Format • Open book, open note, no electronic devices • Comprehensive • Same format as midterms, just longer 11/6/2020 CSE 250, Fall 2012, SUNY Buffalo, @Hung Q. Ngo 3

Coverage • Some basic C++ – Compilation – Arrays, pointers, definitions, declarations • Data

Coverage • Some basic C++ – Compilation – Arrays, pointers, definitions, declarations • Data structures – Stacks, queues, vectors – Lists – Trees, hash tables • Analysis – Asymptotic analysis, amortized analysis – Recurrence 11/6/2020 CSE 250, Fall 2012, SUNY Buffalo, @Hung Q. Ngo 4

- A data structure is a structure allowing for storing, searching, updating data efficiently

- A data structure is a structure allowing for storing, searching, updating data efficiently - Efficiency is measured in terms of space and time WHAT WE HAVE LEARNED 11/6/2020 CSE 250, Fall 2012, SUNY Buffalo, @Hung Q. Ngo 5

Data structures • Arrays • Vectors • Linked Lists – Singly, Doubly, Skip, XOR

Data structures • Arrays • Vectors • Linked Lists – Singly, Doubly, Skip, XOR • Stacks, Queues • Trees – BT, BST, AVL, Red-Black, Splay, (2, 4)-, • Hash tables – Lazy array, direct access, hash codes, compression functions – Collision resolution: separate chaining, open addressing, cuckoo hashing 11/6/2020 CSE 250, Fall 2012, SUNY Buffalo, @Hung Q. Ngo 6

Algorithms Operating on Data Structures • Sorting on arrays & vectors • Traversing, updating,

Algorithms Operating on Data Structures • Sorting on arrays & vectors • Traversing, updating, searching, computing on – Arrays/Vectors – Linked lists – Binary Trees – Hash tables 11/6/2020 CSE 250, Fall 2012, SUNY Buffalo, @Hung Q. Ngo 7

Analyze Data Structures • Asymptotic analysis • Amortized analysis 11/6/2020 CSE 250, Fall 2012,

Analyze Data Structures • Asymptotic analysis • Amortized analysis 11/6/2020 CSE 250, Fall 2012, SUNY Buffalo, @Hung Q. Ngo 8

Some Key Lessons • Randomization is extremely powerful! – Quick sort – Random BST

Some Key Lessons • Randomization is extremely powerful! – Quick sort – Random BST – Universal hash functions – Splay trees – Keep data structure simple yet efficient • Programming is not cut-and-pasting – Non-trivial even when we know the algorithm – The best part is to come up with an algorithm ourselves – Take CSE 331, 431, 531 – need to analyze algorithms too … 11/6/2020 CSE 250, Fall 2012, SUNY Buffalo, @Hung Q. Ngo 9

Some Key Lessons • Designing a Data Structure involves – Mathematical analysis – Experiments

Some Key Lessons • Designing a Data Structure involves – Mathematical analysis – Experiments – Implementation (in C++ or other languages) • In almost all cases, the “right” data structure for our problem depends on the problem domain – Online dictionary – High frequency trading – Relational databases – Domain Name System, Bit. Torrent, … 11/6/2020 CSE 250, Fall 2012, SUNY Buffalo, @Hung Q. Ngo 10