Tag: LeetCode: 242. Valid Anagram

  • LeetCode: 242. Valid Anagram

    Given two strings s and t, return true if t is an anagram of s, and false otherwise. Example: Input: s = "anagram", t = "nagaram" Output: true Input: s = "rat", t = "car" Output: false 问题 给定两个字符串 s 和 t,如果 t 是 s 的字母异位词,则返回 true,否则返回 false。 解决方案 1…