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.
Hey, you have a written an awesome code. Nice and simple approach. But instead if taking string array arr of size n, just take it of size 100. Bcuz the integer x in the constraints range from 0<=x<100 only. Even if n is 30000, ur array will be maximum of 100 elements. Just a thought. But a wonderful approach.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
The Full Counting Sort
You are viewing a single comment's thread. Return to all comments →
Hey, you have a written an awesome code. Nice and simple approach. But instead if taking string array arr of size n, just take it of size 100. Bcuz the integer x in the constraints range from 0<=x<100 only. Even if n is 30000, ur array will be maximum of 100 elements. Just a thought. But a wonderful approach.