7 kyu

Remove the minimum

1,217 of 86,747bkaes

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]
Lists
Arrays
Fundamentals

Stats:

CreatedNov 6, 2015
PublishedNov 6, 2015
Warriors Trained173675
Total Skips22119
Total Code Submissions449005
Total Times Completed86747
Haskell Completions1217
Python Completions32752
CoffeeScript Completions104
JavaScript Completions39568
Ruby Completions3475
C# Completions6416
R Completions412
COBOL Completions13
Rust Completions791
Factor Completions17
C++ Completions2031
Java Completions1210
λ Calculus Completions6
Total Stars1425
% of votes with a positive feedback rating85% of 7907
Total "Very Satisfied" Votes5941
Total "Somewhat Satisfied" Votes1632
Total "Not Satisfied" Votes334
Total Rank Assessments46
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • bkaes Avatar
  • jhoffner Avatar
  • alchemy Avatar
  • CrazyMerlyn Avatar
  • NaMe613 Avatar
  • Chrono79 Avatar
  • JohanWiltink Avatar
  • Voile Avatar
  • Madjosz Avatar
  • mentalplex Avatar
  • hobovsky Avatar
  • akar-0 Avatar
  • dfhwze Avatar
  • razetime Avatar
  • 66  Avatar
  • saudiGuy Avatar
Ad