[algogeeks] Re: Arranging arrays in to two sets.

2006-11-15 Thread Ksitami
Idris napisaƂ(a): > How about using 1 variable o(1) Space.. > > i.e Scan the array and compare the element... at a[1]=a1, a[2]=b1, > a[3]=a2,.. > > first check(a[i]), say b2 in array of size 8, so Its clear b2 must be > placed at 8/2+2 position in an array.. "012345678" => "024681357" .--

[algogeeks] Re: Why do we have different number types for different precisions?

2006-11-15 Thread chris leong
Faster as well. On 11/16/06, yeldarb <[EMAIL PROTECTED]> wrote: > > > > Hi, > > Other than the fact that giving programmers the ability to choose a > number type that best represents the values they will use while not > needlesly using memory - does anyone have another valid reason why it's > good

[algogeeks] Re: Minimal path sum in a matrix (optimizing the algorithm)

2006-11-15 Thread [EMAIL PROTECTED]
Hello, first of all, thanks to all for help! as Lego Haryanto alredy guessed, this one was taken from some on-line competition site. The next problem of this kind is a similar matrix of size 80*80 except that you can start in any column and finish in any other column on the other side of the mat

[algogeeks] Re: Arranging arrays in to two sets.

2006-11-15 Thread Idris
How about using 1 variable o(1) Space.. i.e Scan the array and compare the element... at a[1]=a1, a[2]=b1, a[3]=a2,.. first check(a[i]), say b2 in array of size 8, so Its clear b2 must be placed at 8/2+2 position in an array.. so Space=a[8/2+2] a[8/2+2]=b2, the actual place of b2 now a[

[algogeeks] Why do we have different number types for different precisions?

2006-11-15 Thread yeldarb
Hi, Other than the fact that giving programmers the ability to choose a number type that best represents the values they will use while not needlesly using memory - does anyone have another valid reason why it's good to have them? Cheers --~--~-~--~~~---~--~~