We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I'm not sure what it is. Maybe the platform this runs on is misinterpreting the size of arr_temp and it's not doing the converstion properly.
I had to instead individually parse using Int32.Parse for each element in arr_temp and put it into a new array arr.
I also used the hashmap way to solve this. It's a lot faster than the binary search option and passed all cases.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Hash Tables: Ice Cream Parlor
You are viewing a single comment's thread. Return to all comments →
I was facing an issue with the C# given code for this problem and finally solved it. There's some issue with this code:
I'm not sure what it is. Maybe the platform this runs on is misinterpreting the size of arr_temp and it's not doing the converstion properly. I had to instead individually parse using Int32.Parse for each element in arr_temp and put it into a new array arr.
I also used the hashmap way to solve this. It's a lot faster than the binary search option and passed all cases.