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.
Yes, U can do that that sort of thing, but it would be a messy to firstly count all numbers and then create a discrete array of string buffers and also the space complexity may not be improved very much as x is small(x<=100) and u are also using an another array to store values which are not null.
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 →
Yes, U can do that that sort of thing, but it would be a messy to firstly count all numbers and then create a discrete array of string buffers and also the space complexity may not be improved very much as x is small(x<=100) and u are also using an another array to store values which are not null.