CS234 Study Guide - Midterm Guide: Multiset, Linked List, Priority Queue

145 views5 pages

Document Summary

Group a: single items, any type, no information, no positioning. Group a: set - can contain each value at most once. Group b: single items, any type, no information, positioning by order of insertion or specification of position. Push(s, item) add item to top worst case: o(n) best case: o(1) worst case: o(1) best case: o(1) Pop(s) item that was on top delete item from top worst case: o(1) best case: o(1) worst case: o(1) best case: o(1) Dequeue(q) item was first add item to back delete item from front. Isemptylist(l) of given length true if empty, else false. , index) item that was in position index delete item at index. R) true if empty, else false length of ranking item with ranking rank. Deletefromranki ng(r, rank) item with ranking rank delete item at rank. Loopupgrid(g, i1, i2) item in position (i1, i2) Addtogrid(g, item, i1, i2) add item in position (i1, i2)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents

Related Questions