Staircase search

a better method is staircase search maybe??

hello @ranahiten8

yeah thats best approach for ths problem