about | help | code help+videos | done | prefs |
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) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100
Copyright Nick Parlante 2017 - privacy