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

 

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

Write the method orderCards. This method receive a String array of "cards". The method will sort the cards in suit and card order and return these cards in a string array. We will define "ordered suits as Clubs, Diamonds, Hearts, and Spades (C,D,H,S). Sample: ["HA","H2","H3","C4","D9"] the return String array would be:["C4","D9","HA","H2","H3"]


orderCrads(["HA", "H2", "H3", "C4", "D9"]) → ["C4", "D9", "HA", "H2", "H3"]
orderCrads(["SA", "H2", "S3", "D4", "H9"]) → ["D4", "H2", "H9", "SA", "S3"]
orderCrads([]) → []

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

public String[] orderCrads(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: 100 Post-solution available

Copyright Nick Parlante 2017 - privacy