Grokking the Engineering Manager Coding Interview
Ask Author
Back to course home

0% completed

Vote For New Content
I think the solution for the smallest subarray with a given sum has a bug. We ar...

farhad nooralahzadeh

Dec 3, 2021

I think the solution for the smallest subarray with a given sum has a bug. We are incrementing the window end after the if or while so there is no chance to catch the min_lenght=2 in the example

0

0

Comments
Comments
Design Gurus
Design Gurus4 years ago

Can you give a sample input where the solution fails?

F
farhad nooralahzadeh4 years ago

Sorry, I was using the 'if' instead of while!