{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lec24

# Lec24 - Lecture 24 Standard Template Library Review PIC 10B...

This preview shows pages 1–10. Sign up to view the full content.

1 Lecture 24: Standard Template Library & Review PIC 10B Todd Wittman Note: STL will not be on the final exam.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2
3 Iterators have been overloaded to look like pointers.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4
5

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6
7 Final Exam square6 Sunday March 15th square6 3:00-6:00 square6 Young Hall 24 square6 The final exam is worth 30% of your grade, same weight as 2 midterms. square6 Length is also roughly 2 midterms (2 hrs). square6 Very similar in style to practice exams and midterms. square6 Half short-answer, half long-answer. square6 Emphasis on material covered since last exam (heaps, hash tables, sorting) . square6 Remember to bring your student ID.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 Data Structures square6 Basic Data Structures box2 Vector box2 Linked List box2 Stack box2 Queue box2 Binary Search Tree box2 Heap box2 Hash Table Vectors square6 A vector is the C++ Standard Template Library (STL) class for storing a list of data in a dynamic array. Memory blocks in a vector are sequential, allowing for fast indexing. square6 Constructor : vector<T> myVector (size) ; square6 Functions : size() square6 Ex : Write a templated function which performs a binary search on a sorted vector. Can you make it recursive? O(N) O(1) O(N) O(logN) if sorted Erase/Insert Indexing Search
9 Linked Lists square6 A linked list is a set of memory blocks, called nodes. In a doubly linked list, each node contains a data value and pointers to the next and previous nodes.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern