LeetCode:242. Valid Anagram
来源:互联网 发布:淘宝异常订单怎么处理 编辑:程序博客网 时间:2024/05/16 05:07
Given two strings s and t, write a function to determine if t is an anagram of s.
For example,
s = "anagram", t = "nagaram", return true.
s = "rat", t = "car", return false.
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?
AC:
class Solution {public: bool isAnagram(string s, string t) { sort(s.begin(),s.end()); sort(t.begin(),t.end()); return s==t?true:false; }};
0 0
- [leetcode] 242.Valid Anagram
- leetcode 242. Valid Anagram
- [leetcode] 242. Valid Anagram
- leetCode 242. Valid Anagram
- Leetcode 242. Valid Anagram
- 242. Valid Anagram LeetCode
- LeetCode 242. Valid Anagram
- LeetCode 242. Valid Anagram
- [LeetCode]242. Valid Anagram
- 【LeetCode】242. Valid Anagram
- leetcode 242. Valid Anagram
- leetcode 242. Valid Anagram
- LeetCode--242. Valid Anagram
- LeetCode *** 242. Valid Anagram
- #leetcode#242. Valid Anagram
- leetcode 242. Valid Anagram
- LeetCode 242. Valid Anagram
- 242.[LeetCode]Valid Anagram
- Android绘制圆形图片的方法总结
- CSRF的原理以及防范
- MySQL高可用架构之MHA
- 查看追踪源代码工具Source Insight 3.50.0083
- Java 并发API
- LeetCode:242. Valid Anagram
- Java date 格式转换
- 文本域textarea 点击文本消失 离开文本复原
- 通配符和正则表达式
- PHP rtrim第二个参数删除的是一个字符列表而不是整个字符串
- Exception in thread "http-bio-8080-exec-42"
- JS中arguments.callee用法及属性
- Button被选择之后,背景颜色的变化
- Spring定时任务的配置