New season, new league
Description:
The new football league season is coming and the Football Association need some help resetting the league standings. Normally the initial league standing is done in alphabetical order (from A to Z) but this year the FA have decided to freshen it up.
It has been decided that team who finished first last season will begin the next season in first place. Regardless of what letter their club begins with. e.g. if Manchester City were in first place last year, they will begin the season in position one. All other teams should be in alphabetical order.
The teams will be fed in as an object ({}). The key will be will be their position from last season and the value is the club's name e.g. Arsenal.
The output should be an object ({}) with the key as the club's starting position for the new season and the value should be club's name e.g. Arsenal.
For example. If in the previous season the standings were:
1:'Leeds United' 2:'Liverpool' 3:'Manchester City' 4:'Coventry' 5:'Arsenal'
Then the new season standings should
1:'Leeds United' (first last season) 2:'Arsenal' (alphabetical) 3:'Coventry' (alphabetical) 4:'Liverpool' (alphabetical) 5:'Manchester City' (alphabetical)
Similar Kata:
Stats:
Created | Mar 31, 2017 |
Published | Mar 31, 2017 |
Warriors Trained | 2585 |
Total Skips | 75 |
Total Code Submissions | 3214 |
Total Times Completed | 993 |
JavaScript Completions | 450 |
Crystal Completions | 9 |
Ruby Completions | 74 |
Python Completions | 501 |
Total Stars | 31 |
% of votes with a positive feedback rating | 90% of 204 |
Total "Very Satisfied" Votes | 167 |
Total "Somewhat Satisfied" Votes | 33 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 15 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |