id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

simona1@sfusd.edu mixedpractice2 > removeLessThanFiveOrGreaterThanSixList
prev  |  next  |  chance

Given an ArrayList of Doubles, return the ArrayList after removing all elements with values less than 5 or greater than 6.


removeLessThanFiveOrGreaterThanSixList([0.11, 3.1, 5.0, 7.5]) → [5.0]
removeLessThanFiveOrGreaterThanSixList([0.0, 0.0, 2.0, 3.0, 4.0, 5.0, 5.0, 6.0]) → [5.0, 5.0, 6.0]
removeLessThanFiveOrGreaterThanSixList([6.0, 5.0, 0.2, 0.2, 0.5, 4.0, 5.0, 5.5, 5.9, 0.12, 45.0]) → [6.0, 5.0, 5.0, 5.5, 5.9]

...Save, Compile, Run (ctrl-enter)

ArrayList <Double> removeLessThanFiveOrGreaterThanSixList(ArrayList <Double> a){ }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Post-solution available

Copyright Nick Parlante 2017 - privacy