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

 

konstans@stuy.edu > isAlmostEqual
prev  |  next  |  chance

Return true If and only if removing exactly 1 letter from s will make s equal to the target String. Hint: Can you use substring() to get the part of a string before a letter, and again to get the part of a string after a letter?


isAlmostEqual("a", "") → true
isAlmostEqual("a", "a") → false
isAlmostEqual("ab", "a") → true

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

public boolean isAlmostEqual(String s, String target){ }

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

Copyright Nick Parlante 2017 - privacy