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

 

test2021_04_22_P1SLHL_combos


Write a method that returns the strings as shown in the test data. You should be able to figure out the pattern from the test data. Note: There is a single space at the very end of all the results. This is not obvious when you look at the test data because of how CodingBat formats the output.


test2021_04_22_P1SLHL_combos("xyz", 1) → "x y z "
test2021_04_22_P1SLHL_combos("qrstuvwxyz", 2) → "q r s t u v w x y z qr rs st tu uv vw wx xy yz "
test2021_04_22_P1SLHL_combos("qrstuvwxyz", 4) → "q r s t u v w x y z qr rs st tu uv vw wx xy yz qrs rst stu tuv uvw vwx wxy xyz qrst rstu stuv tuvw uvwx vwxy wxyz "

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

public String test2021_04_22_P1SLHL_combos(String str, int max) { }

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

Copyright Nick Parlante 2017 - privacy