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

 

jebbert@volusia.k12.fl.us > may12_2017_HL_mrEbbertsRevenge
prev  |  next  |  chance

RECURSION IS OPTIONAL for this problem! Remember that it can help to work some examples out ON PAPER prior to starting! You MAY choose to use helper methods which may or may not be recursive. Write a method that accepts a string with the pre-condition that the string is made up of unique (non-matching) characters and has at least one character. Return the number of different arrangements that can be made using all of the letters from that string. For example, "ABC" has 6 arrangements: ABC, ACB, BAC, BCA, CAB, CBA. Producing all of these arrangements can be done nicely with recursion, but you do NOT have to produce the actual arrangements, just return how many there are.


may12_2017_HL_mrEbbertsRevenge("mn") → 2
may12_2017_HL_mrEbbertsRevenge("mno") → 6
may12_2017_HL_mrEbbertsRevenge("i") → 1

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

public int may12_2017_HL_mrEbbertsRevenge(String str) { }

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: 490

Copyright Nick Parlante 2017 - privacy