{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

AlgorithmicComplexity

AlgorithmicComplexity - BioE131 Algorithmic Complexity...

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

View Full Document Right Arrow Icon
BioE131 Algorithmic Complexity & Midterm Review
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
Binary Chop & Balanced Trees Start with a sorted list. Compare the middle element with the one we want. Narrow the search to the half of the list that contains our element. Iterate this procedure to "home in" on the right element. This takes log 2 (N) steps. A balanced tree is similar to a sorted list, but the search paths are stored explicitly. There are at most log 2 (N) steps to any node from the root. 9 12 14 17 19 23 50 54 67 72 76 9 12 14 17 19 23 50 54 67 72 76 9 12 14 17 19 23 50 54 67 72 76 9 12 14 17 19 23 50 54 67 72 76
Image of page 2
Algorithmic Complexity: Searching and Sorting Binary chop search of N items: O(log N) time, constant space Adding an item to a balanced binary tree: same as binary chop Building a balanced binary tree of N items: O(N log N) time, O(N) space Sorting N items: same as balanced binary tree
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
Databases and SQL Database engines (MySQL, etc.) Efficient indexing, sorting, searching More robust than filesystems for storage Relational
Image of page 4
Image of page 5
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