Get Off-Campus Placement Jobs Info !!!
Programs asked in Mettl Coding Round
Click To Practce List of Programs asked in Nagarro !!!

Car parking problem

Home > Programs > Sorting

4 / 5

Car parking problem. An array given represents the actual order of cars need to be parked. Like for example order is 4,6,5,1,7,3,2,empty. If cars are parked in some order like empty,1,2,3,7,6,4,2. Some person needs to get them into the correct order, list out all instructions to the person to get in the correct order with least number of swaps.

Answer:


Asked In :: Amazon HackerRank

Post Your Answer Here: