Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Oh it's Huffman encoding that is like that, I understand now.
The test is "singleton frequency encode". I get "Expected: null, instead got: ''". The input is encode([['a', 1]], "");
Javascript
Some tests don't make sense. It expects an empty string to be returned when passing an empty string, except if the frequencies have 1 key. Why? Decoding or encoding an empty string should return an empty string.
That is much better, I don't know why I didn't see that.
Yes I know another way to solve it. I just don't understand why pop fails to remove the last item.
Anyone want to explain why pop works for test cases and not on random tests?