Hello
let say that we have an array [5,5]
01,02,03,04,05
06,07,08,09,10
11,12,13,14,15
16,17,18,19,20
21,22,23,24,25
the user should send 2 values to the function (start,searchFOR) for example (13,25) the function should search for that value in this way
07,08,09
12, ,14
17,18,19
if the value is n't found in this level it will goes a level higher
01,02,03,04,05
06, , , ,10
11, , , ,15
16, , , ,20
21,22,23,24,25
if the array is bigger than this and the value didn't found it will go to a level higher
Thanks for your help
<<<< EDIT >>>> FOR 25
, , , ,
, , , ,
, , , ,
, , ,19,20
, , ,24,
, , , ,
, , , ,
, ,13,14,15
, ,18, ,
, ,23, ,
, , , ,
,07,08,09,10
,12, , ,
,17, , ,
,22, , ,
01,02,03,04,05
06, , , ,
11, , , ,
16, , , ,
21, , , ,