What is an elegant way to solve this max and min problem in Ruby or Python?
- by ????
The following can be done by step by step, somewhat clumsy way, but I wonder if there are elegant method to do it.
There is a page: http://www.mariowiki.com/Mario_Kart_Wii, where there are 2 tables... there is
Mario - 6 2 2 3 - -
Luigi 2 6 - - - - -
Diddy Kong - - 3 - 3 - 5
[...]
The name "Mario", etc are the Mario Kart Wii character names.
The numbers are for bonus points for:
Speed Weight Acceleration Handling Drift Off-Road Mini-Turbo
and then there is table 2
Standard Bike S 39 21 51 51 54 43 48 Out
Bullet Bike 53 24 32 35 67 29 67 In
Bubble Bike / Jet Bubble 48 27 40 40 45 35 37 In
[...]
These are also the characteristics for the Bike or Kart.
I wonder what's the most elegant solution for finding all the maximum combinations of Speed, Weight, Acceleration, etc, and also for the minimum, either by directly using the HTML on that page or copy and pasting the numbers into a text file.
Actually, in that character table, Mario to Bower Jr are all medium characters, Baby Mario to Dry Bones are small characters, and the rest are all big characters, except the small, medium, or large Mii are just as what the name says. Small characters can only ride small bike or small kart, and so forth for medium and large.