Prep notes for first exam in data structures.
read moreLinked lists: slower in traversing initialization is fast, and constant time. Arraylist not slow, could be as fast as linked lists push is apparently slow Note about linked lists: Would have to create custom linked list, that's just a node class that references the next node in memory and stores a value for itself. Linked list is slower to traverse because you have to follow each reference instead of looking at the stored location directly. preconditions and postconditions aren't really the arguments and the return type, it's more implicit than that. It's like what makes sense in the context of the program. Like if they pass -4 into a function that returns the nth fibonnaci number, then they've violated the precondition and they shouldn't expect a valid post condition (where the post condition is that they'll return the nth fib number). Big Oh notation. O(1) means that run time doesn't dependent on the size of what's being instantiated/run. Essentially, a constant time dependency. If it depends linearly, it's just O(N). stack is drawn vertically, queue is drawn horizontally.