I have the following problem:
Order the following functions in increasing order of asymptotic (big-O) complexity.
I'm not entirely sure how they got to the answer though. I seem to be getting a few correct in a row, but still overall unsure about this. Any explanation would help. Thanks!

Just use the ordering rule constant-linear-(higher-order-polynomial)-exponential-(faster-exponential), where the exponentials don't care about polynomial factors. The given order is correct viz.$$f\in O(1),\,p\in O(n),\,g\in O(n^2),\,q\in O(n2^{n/2}),\,h\in O(2^n)$$because $n\in o(2^{n/2})$.