This is a html code for a game. It displays 10 numbers vertically with two buttons on either side of each number- blue and green. If blue button is clicked, The entire sequence from where it is clicked gets reversed. If the green button is clicked, That number is exchanged with the next number. Once the button is clicked, It will disappear. That is, Each button can be clicked exactly once. The goal is to arrange the numbers in ascending order using those buttons. Proving that it is always possible to arrange the numbers in ascending order, is also an interesting question…
Log in to reply.