If I only have 8 bytes of ram and a program counter I can do it...
For (I=0; I<1<<31; I++) For (J=0; J<1e6; J++) If (input[J]==I) print(I);
Shoddy runtime, but hey...
For (I=0; I<1<<31; I++) For (J=0; J<1e6; J++) If (input[J]==I) print(I);
Shoddy runtime, but hey...
Or more efficient, dynamically construct an implicit trie/heap type thing, where each leaf is the count of times that int appears (and the int itself is encoded in the location)
That feels really, really handwavy but promising?
You're right, that does sound impossible. :O