1. Yes. On an input list with n integers, mergesort runs in O(n lg n) = O(n^2) time. Alternatively: If we sort a list of k integers, each in the range 1..k, the input is n = k lg k bits long, and the running time is O(k (lg k)^2) = O((k lg k)^2) = O(n^2). 2. Yes. If A invokes B O(n^c) times, plus takes O(n^d) time, and if B takes O(n^e) time, then the total running time is O(n^c n^e + n^d) = O(n^f) where f = max(c+e,d) which is polynomial.