← Discussions on Add Binary Strings
K kmalhotra OFFICIAL
06 Jun 2026, 09:27

Why does my solution TLE on the last test case?

XOR cancels equal numbers, and x & (x - 1) clears the lowest set bit. Both give O(1) space solutions here.

1 reply

sahil.p 5 months, 2 weeks ago

Nice. Got asked a variant of this in an interview.

Sign in to reply.