Explain how in the end the king was chosen to be hanged?
There was no one who could be hanged, as one after the other they were pardoned. The crowd had gathered to witness the hanging and they were becoming restless. The king noticed their mood and was worried. As the loop was a little high, all the people were measured one by one to see who would reach the noose. The king was found to be of the exact size and so he was hanged in the end.