Can someone explain to me why Cracking the Coding Interview says that this algorithm has a time complexity of O(P + D)? Is it not O(n^2)?
public stat