6 kyu
Sort My Animals
506 of 2,609GrahamD
Description:
Consider the following class:
public class Animal
{
public string Name { get; set; }
public int NumberOfLegs { get; set; }
}
Write a method that accepts a list of objects of type Animal, and returns a new list. The new list should be a copy of the original list, sorted first by the animal's number of legs, and then by its name.
If an empty list is passed in, it should return an empty list back.
Lists
Sorting
Fundamentals
Similar Kata:
Stats:
Created | Apr 25, 2017 |
Published | May 2, 2017 |
Warriors Trained | 4878 |
Total Skips | 137 |
Total Code Submissions | 11508 |
Total Times Completed | 2609 |
C# Completions | 506 |
JavaScript Completions | 1613 |
Python Completions | 536 |
Total Stars | 60 |
% of votes with a positive feedback rating | 93% of 512 |
Total "Very Satisfied" Votes | 449 |
Total "Somewhat Satisfied" Votes | 51 |
Total "Not Satisfied" Votes | 12 |
Total Rank Assessments | 19 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |