forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice hcs-strings > hcsStringsGimmeOdds
prev  |  next  |  chance

For the given input String, return an output String containing only the odd-indexed characters from the original, in their original sequence. This means index 1, then index 3, then index 5 etc.

hcsStringsGimmeOdds("abcdefg") → "bdf"
hcsStringsGimmeOdds("aAaAaAa") → "AAA"
hcsStringsGimmeOdds("AaBbCcDd") → "abcd"

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

public String hcsStringsGimmeOdds(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: 200

Copyright Nick Parlante 2017 - privacy