Skip to content
update

Reminder: if your solution passes 120/123 test cases, it is…

Nikhil Sharan@nikhil_twopointers

May 22, 2026

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

4

Sign in to join the conversation.

Sign in to comment
Rohit Verma@rohit_codes
int overflow wala sabse dard deta hai. mid = (l + r) / 2 ne kitno ki naukri li hai 😂
4 net votes
Nikhil Sharan@nikhil_twopointers
l + (r - l) / 2. Write it on your hand before the interview 😄
1 net votes
Sam Whitaker@segfault_sam
my code passes 120/123 test cases and 0/1 code reviews
4 net votes
Karthikeyan S@karthik_embedded
negative numbers especially. Half the "sum" questions people forget a[i] can be -10^9
2 net votes