Reminder: if your solution passes 120/123 test cases, it is…
Nikhil Sharan@nikhil_twopointers
Reminder: if your solution passes 120/123 test cases, it is not "almost right". It is wrong. The 3 failing cases ARE the interview. Check empty input, single element, all duplicates, negative numbers and int overflow. Every time.
Get the best of Dynamo Geeks weekly
One email each Monday with the most useful posts. No spam; unsubscribe in one click.
Comments
Sign in to join the conversation.
Sign in to commentRohit Verma@rohit_codes
int overflow wala sabse dard deta hai. mid = (l + r) / 2 ne kitno ki naukri li hai 😂
Karthikeyan S@karthik_embedded
negative numbers especially. Half the "sum" questions people forget a[i] can be -10^9