If f(x) = 3x^2 + 4x + 7, what is its Big O?
What is an optimal Big O for sorting?
O(n log n)
Which is better, O(n^2) or O(n log n)?
O(n log n)
What is the Big O of a nested for loop used to traverse a 2D array?
What is the result of (rest '(a b c))?
What is the Big O of 'reverse' of a list of length n?
What is the result of mapcar 'twice '(3 4 5) given (defun twice (x) (* 2 x))?
(6 8 10)
If the following operations are done on a Stack, what comes out? Push a, Push b, Pop, Push c, Pop, Pop...
- b, c, a
- Stack uses LIFO priority
If the following operations are done on a Queue, what comes out? Insert a, Insert b, Remove, Insert c, Remove, Remove
- a, b, c
- Queue uses FIFO priority
If coll is a LinkedList of Integer, write a function to add up all the elements..
Write the following expression as a tree:
x = (a + b) * c
Give an advantage of the first-child/next-sibling form of a tree.
What is the Big O of search for a specified String in a binary search tree containing n Strings, if the tree is balanced?
In a DFS of a tree with branching factor b and depth d, what is the Big O of time required? How much stack depth is required.