← Shortest Subarray With Sum ≥ Target
Discussions
Sign in to join the discussion.
R
rkumar
OFFICIAL
1 week, 5 days ago
Clean C++ solution, beats most submissions.
The answer space is monotonic, so binary search on it. Be careful with the loop condition (lo < hi vs lo <= hi) and how you move the bounds.
💬 0 replies
S
shrutisha8
OFFICIAL
1 month, 1 week ago
Why does my solution TLE on the last test case?
The answer space is monotonic, so binary search on it. Be careful with the loop condition (lo < hi vs lo <= hi) and how you move the bounds.
💬 3 replies
V
vikram_36
OFFICIAL
1 month, 2 weeks ago
Why does my solution TLE on the last test case?
The answer space is monotonic, so binary search on it. Be careful with the loop condition (lo < hi vs lo <= hi) and how you move the bounds.
💬 2 replies