@kunal: could u plz explan ur XOR approach by using a small set of numbers. lets say we have numbers from 1 to 5 and one number is missing. so u mean 1 XOR 2 XOR 4 XOR 5 would give me 3???
On Jun 10, 11:41 pm, Kunal Patil <kp101...@gmail.com> wrote: > @ Dumanshu: > With memory restriction also XOR method works.. :) > In this case difference is just that you will be working with 40000000000/ X > number of files..where X is size of the RAM...just maintain a variable > Curr_XOR_value and go on XORing it with element read from the file. > When you are done with reading all those numbers from "40000000000/ X" > files.. > (Curr_XOR_value) * XOR* (expected_XOR_value for 1 to 40000000000) ... > will give missing number... -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.