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

 

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

Write the method sortByValue. This method receive a String array of "cards". The method will sort the cards card order and return these cards in a string array. We will define "ordered value as 2 the lowest ... and Jack, Queen, King, and Ace. Sample: ["S7","H5","DA","H3","DQ"] the return String array would be:["H3","H5","S7","DQ","DA"] Note: Each card value will be unique (ie no pairs, three of a kind, etc.)


sortByNumber([]) → []
sortByNumber(["H4", "DA", "S5"]) → ["H4", "S5", "DA"]
sortByNumber(["S7", "SK", "DA", "DQ", "H5", "H3"]) → ["H3", "H5", "S7", "DQ", "SK", "DA"]

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

public String[] sortByNumber(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

Copyright Nick Parlante 2017 - privacy