GO Solution For UVa 10152 - ShellSort. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

He made each turtle stand on another one’s back And he piled them all up in a nine-turtle stack. And then Yertle climbed up. He sat down on the pile. What a wonderful view! He could see ’most a mile!

King Yertle wishes to rearrange his turtle throne to place his highest-ranking nobles and closest a

...

You can find the full details of the problem ShellSort at UVa Online Judge

Sample Input

2
3
Yertle
Duke of Earl
Sir Lancelot
Duke of Earl
Yertle
Sir Lancelot
9
Yertle
Duke of Earl
Sir Lancelot
Elizabeth Windsor
Michael Eisner
Richard M. Nixon
Mr. Rogers
Ford Perfect
Mack
Yertle
Richard M. Nixon
Sir Lancelot
Duke of Earl
Elizabeth Windsor
Michael Eisner
Mr. Rogers
Ford Perfect
Mack

Sample Output

Duke of Earl

Sir Lancelot
Richard M. Nixon
Yertle

Solution: Please check the main.go snippet for the solution.

Solution originally posted at: Github by @codingsince1985