your explanation is best and easy to understand that i can find , please do it regularly for every contest(only 2nd and 3rd question🙂)
@RoadToFAANG1992Ай бұрын
Thank you! I’m glad it was helpful and will continue to do as many contests as I can
@MohamedElquesniАй бұрын
Nice Explanation , However I am still confused how do you handle such cases [88,53] k = 27 numOperations = 2 , this test case focusses on having 2 numbers not reachable through k directly, however could reach each one another through middle num for example here 66 where 88-22 and 53+13 ,as one could not be reached to other directly by applying +/- 27
@RoadToFAANG1992Ай бұрын
Yea the logic still works for cases like that. The reason is that we are not testing only those numbers, but also all the numbers in between. We will eventually get to 66 and test what numbers we can change to get to 66.