{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
1 Lecture 24: Standard Template Library & Review PIC 10B Todd Wittman Note: STL will not be on the final exam.
Image of page 1

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

View Full Document Right Arrow Icon
2
Image of page 2
3 Iterators have been overloaded to look like pointers.
Image of page 3

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

View Full Document Right Arrow Icon
4
Image of page 4
5
Image of page 5

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

View Full Document Right Arrow Icon
6
Image of page 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.
Image of page 7

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

View Full Document Right Arrow Icon
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
Image of page 8
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.
Image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern