rangacoder
BAN USERFirst split the 1 TB data into 1024 blocks and then sort these files/data individually.
Then open all files (1024 of them. just have a pointer to the beginning of the file, not load the entire file). read the first entry from all the files and then put them into a min heap. So this way, we get 1st 1000 integers which are sorted globally. Next again load the heap with next 1000 entries from the file, continue this until all the entries in the file are finished.
This gets the min count of characters. If a string is aabbb, then this gives 'a' as the output.
the question is first non-repeated character. this code neither gets first nor the non - repeating one
Correct me, if i am wrong. This does not identify anything,neither first nor the last character.
if String = "aabccddeea", your code gives 'e' as the output (neither first, nor last)
- rangacoder February 03, 2016