Well I am saying this third consecutive time that I have solved UVa 100 - The 3n + 1 problem I have first implemented simple hash by creating a array of size 1000000 and then I store result in that array, then I tried C++ Unordered Map for hashing and time difference between both of them are too huge for same input
here is my source code
I have tried pasting my code here but every time it shattered so I paste here Sorry :(
here is the time taken by 1. Simple array 2. Simple Map 3. unordered map
So why there is too much time difference between unordered map and simple array. I know simple map is slow but the difference is about 3 min :(