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

 

abraskin@mbusd.org > stringsInBetween
prev  |  next  |  chance

Given an array of Strings, and two additional Strings s1 and s2, count how many of the arrays strings fall between s1 and s2 lexicographically. s1 will always come before s2 in the alphabet and all the Strings will use only lower-case letters.


stringsInBetween(["aaron", "michael", "ken", "david", "greg", "gena", "brandy", "scott"], "kelly", "tom") → 3
stringsInBetween(["aaron", "michael", "ken", "david", "greg", "gena", "brandy", "scott"], "arnold", "zoey") → 7
stringsInBetween(["b"], "a", "c") → 1

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

public int stringsInBetween(String[] arr, String s1, String s2) { }

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