QUESTIONS AND CORRECT ANSWERS
List.append(x) - CORRECT ANSWER adds x at last element
List.pop(x) - CORRECT ANSWER removes the x element
List.remove(x) - CORRECT ANSWER removes the x value
Tuple.count(x) - CORRECT ANSWER returns how many times x is in tuple
Tuple.index(x) - CORRECT ANSWER finds where x is located in the tuple
Set.update(set2) - CORRECT ANSWER adds new set to current set
Set.add(x) - CORRECT ANSWER adds x to set
Set.remove(x) - CORRECT ANSWER finds x and removes from set
Set.pop() - CORRECT ANSWER removes RANDOM element from set
Set.clear() - CORRECT ANSWER clears set
Set.intersection(set2, set3) - CORRECT ANSWER sees what both sets have in common
Set.union(set2, set3) - CORRECT ANSWER combines both sets
Record - CORRECT ANSWER A group of related items.
Stores subitem names, then lists associated subitem (field)
, Linked List - CORRECT ANSWER A list that has an element.
ALSO has a reference to the next node
Doubly Linked List - CORRECT ANSWER Linked list, but ALSO has a reference to the
previous node.
Can traverse back and forth
Hash Table datatypes - CORRECT ANSWER Array and Dictionaries.
Has BUCKETS and MAPPING KEYS.
Stores values based on common characteristic (ex. %10 of each value)
Hash Table Collision - Chaining - CORRECT ANSWER Value is put in a PRE-EXISTING
bucket
Hash Table Collision - Probing - CORRECT ANSWER Instead of chaining, the value is put in
an UNOCCUPIED bucket
Queue.Enqueue(x) - CORRECT ANSWER adds x to END of queue
Queue.Dequeue()
Queue.Dequeue(x) - CORRECT ANSWER Removes FRONT element
Removes x from queue
Queue.pop() - CORRECT ANSWER removes REAR element
Deque.pushfront(x)
Deque.pushback(x) - CORRECT ANSWER Adds to front / end of deque