
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Data structures and algorithms
Typology: Cheat Sheet
1 / 32
This page cannot be seen from the preview
Don't miss anything!

























Merge Sort: T(n) = 2T(n/2) + Ө(n) T(n/2) for left T(n/2) for right Ө(n) for merge Recursion Tree gets you 2k(c(n/2k) + b) *On next slide
Running time = Ө(n)
Stable and unstable sorting algorithms:
5
Order Statistic ith order statistic is the ith smallest element in A[1…n]
Hash by division: h(k) = k mod m (k is key, m is table size) Hash by multiplication: h(k) = floor(m = (k * A mod 1)) Open Addressing - all elements stored inside hash table stored directly (no linked list)
Linear probe (m probe sequences)