Complexity

Part A

Part B