题目描述
Given two strings s and t which consist of only lowercase letters.
String t is generated by random shuffling string s and then add one more letter at a random position.
Find the letter that was added in t.
Example:
1 |
Input: |
解题思路与代码
这个题类似Single Number,也就是两个字符串除了一个字符以外,其他字符都是两两相等,找出只出现一次的字符。代码如下:
1 |
public class { |
近期评论