about | help | code help+videos | done | prefs |
apcsaLoopsMaxIndex
Given an input String, find and return the INDEX of the "highest" character in the input (i.e., the character which comes later in an ordering of characters than all others). If there are multiple instances of this highest character, return the lowest index where the character is found. Precondition: str will have at least one character. See the prior problem apcsaLoopsMaxCharacter for more advice on extracting and comparing String characters.apcsaLoopsMaxIndex("ab") → 1 apcsaLoopsMaxIndex("Xena") → 2 apcsaLoopsMaxIndex("1234567890") → 8 ...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: 210
Copyright Nick Parlante 2017 - privacy