Number of Subarrays of size K and Average Greater than or Equal to Threshold - Leetcode 1343 Python

preview_player
Показать описание


0:00 - Read the problem
0:30 - Drawing Explanation
4:25 - Coding Explanation

leetcode 1343

#neetcode #leetcode #python
Рекомендации по теме
Комментарии
Автор

Hey man, thanks so much.
I am a nubby to leetcode but yours clear, concise and to the point explanations are another level and helps me to feel confident.
You are a legend😘😘😘

infinity-clips
Автор

Hey, quick question. k can be just as long as arr, so wouldn't the "arr[:k-1]" in the solution create a new array possibly as long as arr in the worst case? Unnecessarily, making the space complexity O(n)?

michaellugashi
Автор

For [1, 1, 1, 1, 1], k=1, thresh=0, there should be only 1 sub-array (which is [1]) but the correct answer shown is 5. Sub-arrays [1] and [1] are considered different. Any clue why so?

paras
Автор

Excellent solution very useful, Thanks

ankurbhambri
Автор

Please make video lecture on OOPS in python complete. Please make it in 1-2 coming days it will be helpful for interviews on your main channel or this channel.

utkarshgosavi
Автор

*beats 57%*

“it’s pretty efficient”

what?

stxnw
join shbcf.ru