79771572

Date: 2025-09-22 12:00:09
Score: 2
Natty:
Report link

Building off of Austin's answer since I was also looking for an example where (tight) big-O and big-W for worst case was different. Think of this: we have some (horrible) code where we have determined that the runtime function for the worst case inputs set is 1 when n is odd and n when n is even. Then, the upper bound of the runtime of the worst case of this code is O(n), while the lower bound is W(1).

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Rodrigo Martinez