3097. Shortest Subarray With OR at Least K II | Leetcode Daily (POTD) 10 Nov 2024 | Medium | Java

preview_player
Показать описание
*"3097. Shortest Subarray With OR at Least K II"* is a medium-level problem and the LeetCode daily challenge (POTD) for 10 November 2024. The solution, coded in Java, is explained through a dry-run on a blackboard to highlight logic over specific syntax, making it accessible for different programming backgrounds.

*Intuition:*
Apply a sliding window approach using two pointers. Expand the window until the OR of elements reaches at least `K`. Once a valid subarray is found, shrink the window from the left to find the shortest length that meets the condition.

Other problems for practice:

#leetcodejava #leetcode #dailychallenge #potd #hindi
Рекомендации по теме
Комментарии
Автор

Thankyou so much maam,

Radhe radhe !

khushantwankhede
Автор

Radhe Radhe. thanx you for the solution. really very helpful.

harishbehera
Автор

Thank you di. solved today's problem of the day 😃

ANKITVERMA-yuro
Автор

good explain mam....sath me thod concept bhi explain kr diya karo

NishantPandat-lq
Автор

how you developed your logic skill.. i am trying hard but still lacking can you help me please

harshitmishra
Автор

at 9:20 why r u taking the ans =n+1 or 4 ?

animeshkumar
Автор

aur voice bhi thoda tej kar dijiye mam

NishantPandat-lq
welcome to shbcf.ru