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

 

andersoniii.edwin@cusd80.com > keepHearts
prev  |  next  |  chance

Write the method keepHearts. This method receive a String array of "cards". The method will find all Hearts and return all non-hearts in a string array. Sample: ["H1","H2","H3","C4","D9"] the return String array would be:["C4","D9"]


keepHearts(["H1", "H2", "H3", "C4", "D9"]) → ["C4", "D9"]
keepHearts([]) → []
keepHearts(["H1", "H2", "H3", "H4", "H9"]) → []

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

public String[] keepHearts(String[] cards) }

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

Difficulty: 145

Copyright Nick Parlante 2017 - privacy