Simple solution by Java 8 Stream


  • 0
    X
    public char findTheDifference(String s, String t) {
        return (char) (t.chars().sum() - s.chars().sum());
    }
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.