Google | Onsite | Find extra character
Anonymous User
3356

https://leetcode.com/problems/find-the-difference/

Given two strings s1 and s2 which are of lengths n and n+1. The second string contains all the character of the first string, but there is one extra character. Your task to find the extra character in the second string.

Example:

Input: s1 = "abbc", s2 = "bcbad"
Output: 'd'

Similar problems:

Comments (5)