242. Valid Anagram
❀ Origin
Problem
Given two strings s and t , write a function to determine if t is an anagram of s.
Example 1
1 | Input: s = "anagram", t = "nagaram" |
Example 2
1 | Input: s = "rat", t = "car" |
Note
You may assume the string contains only lowercase alphabets.
Follow up
What if the inputs contain unicode characters? How would you adapt your solution to such case?
❀ 翻譯
問題
給定兩個字串 s 和 t ,
寫出一個 function 去判斷 t 是否為 s 的異位字謎。
筆記
你可以假設字串裡包含的字母只會是小寫。
進一步思考
如果 inputs 包含了 unicode characters,
你會如何使你的解法適應這種狀況?
❀ Solution
Golang
1 | /* * |