7 kyu
Sort rectangles and circles by area
371c4asma
Description:
In this kata you will be given an array of the dimensions of rectangles (array with width and length) and circles (radius - just a number). Your task is to sort the objects by their area in ascending order and return the sorted array of areas. Round the values of the areas to a maximum of two decimal places.
For example,
var array = [[4.23, 6.43], 1.23, 3.444, [1.342, 3.212]]; // [rectangle, circle, circle, reactangle]
sortByArea(array); // should return [ 4.31, 4.75, 27.2, 37.26 ]
Mathematics
Geometry
Fundamentals
Algorithms
Sorting
Similar Kata:
Stats:
Created | Nov 28, 2017 |
Published | Nov 29, 2017 |
Warriors Trained | 676 |
Total Skips | 2 |
Total Code Submissions | 921 |
Total Times Completed | 371 |
JavaScript Completions | 371 |
Total Stars | 7 |
% of votes with a positive feedback rating | 90% of 110 |
Total "Very Satisfied" Votes | 90 |
Total "Somewhat Satisfied" Votes | 17 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 3 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |