Refactor & add one solution (hash table).