Thats not a good example for Big O because number of operations computes exactly to logN in worst case.
Try with mergesort and see how it ends being nlogn
Try with mergesort and see how it ends being nlogn
(In this case the problem is probably made worse by the mental interpretation of "NP" as "Not Polynomial", when it really means "Nondeterministic machine can solve in Polynomial time", and if a deterministic machine can solve something in polynomial time, a nondeterministic machine can do so as well!)