Remove the minimum
Description:
The museum of incredibly dull things
The museum of incredibly dull things wants to get rid of some exhibits. Miriam, the interior architect, comes up with a plan to remove the most boring exhibits. She gives them a rating, and then removes the one with the lowest rating.
However, just as she finished rating all exhibits, she's off to an important fair, so she asks you to write a program that tells her the ratings of the exhibits after removing the lowest one. Fair enough.
Task
Given an array of integers, remove the smallest value. Do not mutate the original array/list. If there are multiple elements with the same value, remove the one with the lowest index. If you get an empty array/list, return an empty array/list.
Don't change the order of the elements that are left.
Examples
* Input: [1,2,3,4,5], output = [2,3,4,5]
* Input: [5,3,2,1,4], output = [5,3,2,4]
* Input: [2,2,1,2,1], output = [2,2,2,1]
Similar Kata:
Stats:
Created | Nov 6, 2015 |
Published | Nov 6, 2015 |
Warriors Trained | 173675 |
Total Skips | 22119 |
Total Code Submissions | 449005 |
Total Times Completed | 86747 |
Haskell Completions | 1217 |
Python Completions | 32752 |
CoffeeScript Completions | 104 |
JavaScript Completions | 39568 |
Ruby Completions | 3475 |
C# Completions | 6416 |
R Completions | 412 |
COBOL Completions | 13 |
Rust Completions | 791 |
Factor Completions | 17 |
C++ Completions | 2031 |
Java Completions | 1210 |
λ Calculus Completions | 6 |
Total Stars | 1425 |
% of votes with a positive feedback rating | 85% of 7907 |
Total "Very Satisfied" Votes | 5941 |
Total "Somewhat Satisfied" Votes | 1632 |
Total "Not Satisfied" Votes | 334 |
Total Rank Assessments | 46 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 8 kyu |