Search:

Type: Posts; User: Mrc0d3r

Search: Search took 0.14 seconds.

  1. Re: find the sum of even number not exceed four million

    Yeah right, a few micro-seconds difference.(and space isn't quite a big problem these days though !)



    Thanks !
  2. Re: find the sum of even number not exceed four million

    Completely agree ! And regarding the multi-threading part, I thought we could split up the work to threads :S




    This can do the job I suppose..

    next = next + last;
    last = next - last;
  3. Re: find the sum of even number not exceed four million

    That piece of code would certainly do the job, but it can be made more efficient by implementing recursion also you can fix the swap part to a 2 variable one. A little bit of threading should make it...
Results 1 to 3 of 3