- 博客(3)
- 收藏
- 关注
原创 Leetcode 由易入难 389. Find the Difference
Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the letter that was added in
2017-08-25 09:53:53
246
原创 Leetcode 从易入难 485.Max Consecutive Ones
Given a binary array, find the maximum number of consecutive 1s in this array.这里面用到的语句max=max>++cur?max?cur; 意思相当于如果nums[i]为1,cur加一,再做判断此时最大的max与cur相比谁大来更新max的值。 当nums[i]为0的时候,cur归0重新计算。到最后输出max。c++实
2017-08-24 10:20:08
231
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人