Given a non-negative integer num and a zero-based bit position p, return the integer resulting from flipping only the bit at position p (i.e., 0 becomes 1, 1 becomes 0). Explain your approach and its time/space complexity.
Sign in to leave a comment