Skip to main content

All Questions

Tagged with
0 votes
1 answer
2k views

Efficient way to find Xor of pairs with given target X in a range 0 to K

I came across a problem: given an array (can be huge 10^8) and an integer, K, find the count of pairs in the array whose Xor equal to each value in the range 0 to K. eg: Arr = 1 2 3 K = 2 since K=...
Kalpish Singhal's user avatar
2 votes
1 answer
670 views

Is this synchronization required in service onCreate method?

Below is a sample code i captured from android doc Per service instance onCreate will be called only once. Ref: here and here The synchronization and singleton doesn't make any sense to me in this ...
Saran's user avatar
  • 407
5 votes
1 answer
420 views

Website with test data files for specific algorithms/data structures?

Is there any website, like SPOJ and Project Euler, with the test data files available for specific algorithms/data structures? I know it's a fun challenge to solve those problems on your own, but I ...
Zolomon's user avatar
  • 305
5 votes
1 answer
1k views

Coding site with test harness for basic data structures like linked list,graph,strings etc [closed]

I just took an Amazon online test and I messed it up badly. I am out of practice and have low confidence in writing code. Are there any coding sites with test harnesses for basic data structures and ...
xyz's user avatar
  • 1,162