about | help | code help+videos | done | prefs |
Write a method that returns the first part of a string up to the first duplicate character (a duplicate character is when two identical characters are right in a row). Look at the test data for examples. The only string methods you may use are .length, .charAt, .substring, and .equals. As a precondition, you may assume that the input parameter has at least one character. nov18_2016_APSLHL_upToDuplicate("dropping") → "drop" nov18_2016_APSLHL_upToDuplicate("continue until duplicate") → "continue until duplicate" nov18_2016_APSLHL_upToDuplicate("bookkeeper") → "bo" ...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: 290
Copyright Nick Parlante 2017 - privacy