Waste less time on Facebook — follow Brilliant.
×

swapping digits

you need to create a program in which the user will enter a number and output the minimum no of swaps required to make the number an ordered one. for example: 921 1 and 9 will be swapped to obtain 129 which is the least no in this case. hence no of swaps is 1.

Note by Parker Prathyoom
2 years, 3 months ago

No vote yet
1 vote

Comments

Sort by:

Top Newest

I did it prathyoom. A simple program without functions in array Annonimus Shreyas · 2 years, 3 months ago

Log in to reply

Couldn't find answer? Annonimus Shreyas · 2 years, 3 months ago

Log in to reply

@Annonimus Shreyas Yea Parker Prathyoom · 2 years, 3 months ago

Log in to reply

×

Problem Loading...

Note Loading...

Set Loading...