Question: Use recursion to solve problem 2 of homework 3 (the swimmers problem), repeated here for reference: Four swimmers are selected to be part of the

 Use recursion to solve problem 2 of homework 3 (the swimmers

Use recursion to solve problem 2 of homework 3 (the swimmers problem), repeated here for reference: Four swimmers are selected to be part of the team for a 4x100 medley relay race. In this race, one swimmer will swim freestyle, one breaststroke, one butterfly, and one backstroke. The times that each swimmer can do in each style are summarized in this table: Time (seconds) Breast Fly Swimmer Free Back 54 Gary Hall Mark Spitz Jim Montgomery Chet Jastremski 53 52 54 57 53 51 50 56 51 52 54 55 56 53 54 Make a program that tries all possible assignments of swimmers to styles. For each assignment, compute and print the total time of the race. Note that there are 24 different permutations possible. the least total time. This should be done automatically by Find the assignment that results your program. Notes: . . The program should use recursion to generate all the swimmer permutations. The program should compute the best time automatically. The program should compute print the swim order that results in the best time automatically

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!