Re:I cheated on my Microsoft interview (2019)
by zeroonetwothree on Sunday June 05, 2022 @10:39AM
(#31631381)
Every solution is at least O(n).
Re:I cheated on my Microsoft interview (2019)
by TheRealNGenius on Sunday June 05, 2022 @04:43PM
(#31634639)
Wrong, calculating n(n-1)/2 is O(1)
Honestly if you're stressing over a question like this, combined with thinking that integer overflow is even remotely something that you need to be concerned about in a question like this, you're definitely not passing any leetcode interview problems tossed around in today's interviewing culture.