Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 744 Bytes

File metadata and controls

36 lines (28 loc) · 744 Bytes

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