Saturday, March 12, 2016

HackerRank: String algorithm - Game Throne.

March 12, 2016

Great workout! Julia made a few mistakes, and then, fixed the issues:

https://gist.github.com/jianminchen/e7038fa7e59c96378675

Julia, your code is not short enough. Study other people's submission:

1. using Dictionary
2. declare array size of 26, not 256
3. other things - check string input etc.
4. using string manipulation, from an empty string, remove char if finding it, otherwise, append the char.

C#:
1. https://gist.github.com/jianminchen/6bf133d5c42e18260410

2. https://gist.github.com/jianminchen/bd3834da7b28ae619ee2

3. https://gist.github.com/jianminchen/16e9837b7b6b1e1a721c

Read a few of solutions using Java, C++. Great experience, relax and have some fun.



No comments:

Post a Comment