Facebook killed the radio star. And by radio star, I mean the premise of distributed forums around the internet. And that got got by Instagram/SnapChat. And that got got by TikTok. Where the fuck is the internet we once knew?
0 Members and 1 Guest are viewing this topic.
int findDuplicate(int array[]) { int[] heap = new int[2^sizeof(int)]; // assume heap is all zeroes for(int value : array) { if(heap[value]++ > 0) return value; } throw exception;}
int findSingleton(int array[]) { int result = 0; for(int value : array) result ^= value; return result;}