Solution, explanation, and complexity analysis for LeetCode 1482 in Java Problem Description: leetcode.com/problems/minimum... Code: github.com/AnatoliySokolov98/...
Пікірлер: 6
@sunshinekanika5797Ай бұрын
would sliding windows make it concise or possible that way?
@Alpha-CodeАй бұрын
I don't think you can do sliding windows cause you don't know the range of numbers you can have in the window is the issue. That's why bin search is better.
@mituldwivedi4469Ай бұрын
i got the time limit exceed through your code , please help me!!
@Alpha-CodeАй бұрын
which one the Java code? They all seem to be working for me so I think it's an issue on your end.
@mituldwivedi4469Ай бұрын
@@Alpha-Code my bad I interchanged the left and right pointers 🥲🥲
@juanmacias5922Ай бұрын
@@Alpha-Code personally I messed up by incrementing/decrementing by one, and not by the middle + or - 1 lol