Skip to content

Latest commit

 

History

History
 
 

032-trailing-string

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Trailing String

Challenge Description:

There are two strings: A and B. Print 1 if string B occurs at the end of string A. Otherwise, print 0.

Input sample:

The first argument is a path to the input filename containing two comma-delimited strings, one per line. Ignore all empty lines in the input file.

For example:

Hello World,World
Hello CodeEval,CodeEval
San Francisco,San Jose

Output sample:

Print 1 if the second string occurs at the end of the first string. Otherwise, print 0.

For example:

1
1
0