LOL, can you see the "Solved" check at the top right of the problem description? He probably submitted 10x times already, he knows the things. Yet, if he solved it too quickly that would not entertain the TH-cam audience, or "advanced" techniques just scare the beginners away (major of viewers).
ya, I don't know if I remembered to mention it this time, haha, it is something I mention often, and I think I did it last time as well. That said, it's also part of the Q-matrix as well.
Were you able to build them up good?
Yes,with your help we were able to build.
Also, you can space optimise this further to O(max(zero,one)) using bottoms up dp and dp length of window max(zero,one)..
LOL, can you see the "Solved" check at the top right of the problem description?
He probably submitted 10x times already, he knows the things.
Yet, if he solved it too quickly that would not entertain the TH-cam audience, or "advanced" techniques just scare the beginners away (major of viewers).
@ I just informed the audience about a technique and I have no where written that I am not agreeing to his approach..
ya, I don't know if I remembered to mention it this time, haha, it is something I mention often, and I think I did it last time as well.
That said, it's also part of the Q-matrix as well.
may i ask why you define functions inside functions?
keeps the scope tight