7 kyu

New season, new league

450 of 993matthall8

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)

Algorithms

Stats:

CreatedMar 31, 2017
PublishedMar 31, 2017
Warriors Trained2585
Total Skips75
Total Code Submissions3214
Total Times Completed993
JavaScript Completions450
Crystal Completions9
Ruby Completions74
Python Completions501
Total Stars31
% of votes with a positive feedback rating90% of 204
Total "Very Satisfied" Votes167
Total "Somewhat Satisfied" Votes33
Total "Not Satisfied" Votes4
Total Rank Assessments15
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • matthall8 Avatar
  • jhoffner Avatar
  • GiacomoSorbi Avatar
  • smile67 Avatar
  • mauro-1 Avatar
  • Just4FunCoder Avatar
Ad