#Would this method work

13 messages · Page 1 of 1 (latest)

manic cove
#

Method to delete minimum and maximum out of a list

deft muralBOT
#

This post has been reserved for your question.

Hey @manic cove! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

manic cove
topaz island
#

you are better off using normal loop here

#

since you need index

deft muralBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.

lucid torrent
#

list.remove accepts index or object ,so i create max and min as Object,

#

it's work

#

create max and min as Integer

tranquil bay
#

(also, there is the theoretical case of an array with only one element. I suppose there is also the case of an empty array)

#

(while we're at it, not sure what's the point of list.stream().toList())