GO Solution For UVa 10126 - Zipf's Law. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

Harvard linguistics professor George Kingsley Zipf (1902-1950) observed that the frequency of the k-th most common word in a text is roughly proportional to 1/k. He justified his observations in a book titled Human behavior and the principle of least effort published in 1949. While Zipf’s rationale


You can find the full details of the problem Zipf's Law at UVa Online Judge

Sample Input


In practice, the difference between theory and practice is always
greater than the difference between theory and practice in theory.
    - Anonymous

Man will occasionally stumble over the truth, but most of the
time he will pick himself up and continue on.
        - W. S. L. Churchill

Sample Output


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

Solution originally posted at: Github by @codingsince1985