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.
and i was getting wrong answer all the time.
In the step st[k]=st[k].append(s); i was getting all the array elements changed instead of the one at index k.
can anyone help me with this??????
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 →
I had the same logic as you , although i was using Arrays.fill(st, new StringBuffer) instead of the loop
for(int i=0;i<100;i++) { st[i]=new StringBuffer(); }
and i was getting wrong answer all the time. In the step st[k]=st[k].append(s); i was getting all the array elements changed instead of the one at index k. can anyone help me with this??????