what is the easiest way to do this function in c# ?

Posted by From.ME.to.YOU on Stack Overflow See other posts from Stack Overflow or by From.ME.to.YOU
Published on 2010-05-26T01:37:21Z Indexed on 2010/05/26 1:41 UTC
Read the original article Hit count: 255

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

© Stack Overflow or respective owner

Related posts about c#

Related posts about algorithm