![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode-easy
文章平均质量分 58
happyxuma1991
这个作者很懒,什么都没留下…
展开
-
leetcode--242-- Valid Anagram
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原创 2016-03-22 17:56:59 · 202 阅读 · 0 评论 -
leetcode——28—— Implement strStr()
Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.算法的复杂度是O(nm)以后再来学习更快的算法(KMP)class Solution {public: int s原创 2016-04-06 19:26:32 · 228 阅读 · 0 评论 -
LeetCode.299.Bulls and Cows
英文:You are playing the following Bulls and Cows game with your friend: You write a 4-digit secret number and ask your friend to guess it, each time your friend guesses a number, you give a hint, the h原创 2016-03-22 14:45:15 · 280 阅读 · 0 评论 -
LeetCode.303.Range Sum Query - Immutable
Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.Example:Given nums = [-2, 0, 3, -5, 2, -1]sumRange(0, 2) -> 1sumRange(2, 5) -> -1sumRan原创 2016-03-22 15:19:25 · 196 阅读 · 0 评论