As you know,(or dont) The Consistent friend of mine AlRntn recently reached GM . yesterday I noticed he also got my handle conquered too. :joy:
So Congrats ali , keep up. :fire:

As you know,(or dont) The Consistent friend of mine AlRntn recently reached GM . yesterday I noticed he also got my handle conquered too. :joy:
So Congrats ali , keep up. :fire:

hi. I heard Carrot is broken, so do you know anything else that works the same?
Two pointers is a very simple and useful algorithm and actually using it is optional but, using it will make your algorithm easier and more simple.
but now, how to use it ? I think its good for you to look at https://www.geeksforgeeks.org/two-pointers-technique/ too. it'll be useful:blush:
so let go ...
As it's shown by its name this algorithm use two pointers on an array(or two arrays) which initially are located at position x, y . then if CONDITION1 move pointer1 one to left/right and if CONDITION2 move pointer2 one to left or right.
now let's switch to code.
QUESTION ANSWER SPOIL DANGER ==================