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

 

orion.a.smith@gmail.com apcsa-comparestrings > apcsaCompareStringsLastCharacter
prev  |  next  |  chance

Given an ArrayList of String values, determine and return whether the ArrayList is in alphabetical order when considering only the last character of each String. Alphabetical order means "non-descending," which means that if two consecutive Strings have the same last letter, that does not by itself mean that the output is unsorted.


apcsaCompareStringsLastCharacter(["apple", "banana", "grape"]) → false
apcsaCompareStringsLastCharacter(["banana", "apple", "lemon"]) → true
apcsaCompareStringsLastCharacter(["banana", "apple", "grape"]) → true

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

public boolean apcsaCompareStringsLastCharacter(ArrayList<String> lst) { }

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

Copyright Nick Parlante 2017 - privacy