摘要: LeetCode——Find the Difference Question Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling st 阅读全文
posted @ 2017-04-02 12:02 清水汪汪 阅读(180) 评论(0) 推荐(1) 编辑
摘要: LeetCode——Maximum Depth of Binary Tree Question Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longes 阅读全文
posted @ 2017-04-02 11:43 清水汪汪 阅读(110) 评论(0) 推荐(1) 编辑
摘要: LeetCode——Detect Capital Question Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals 阅读全文
posted @ 2017-04-02 11:35 清水汪汪 阅读(150) 评论(0) 推荐(1) 编辑
摘要: LeetCode——Find All Numbers Disappeared in an Array Question Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear tw 阅读全文
posted @ 2017-04-02 11:24 清水汪汪 阅读(188) 评论(0) 推荐(1) 编辑
摘要: LeetCode——Single Number Question Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm sh 阅读全文
posted @ 2017-04-02 10:58 清水汪汪 阅读(157) 评论(0) 推荐(1) 编辑
摘要: LeetCode——Max Consecutive Ones Question Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] 阅读全文
posted @ 2017-04-02 10:50 清水汪汪 阅读(201) 评论(0) 推荐(1) 编辑
摘要: LeetCode——Nim Game Question You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take 阅读全文
posted @ 2017-04-02 10:35 清水汪汪 阅读(147) 评论(0) 推荐(1) 编辑
摘要: LeetCode——Reverse String Question Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "o 阅读全文
posted @ 2017-04-02 09:42 清水汪汪 阅读(121) 评论(0) 推荐(1) 编辑
摘要: LeetCode——Next Greater Element I Question You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Fi 阅读全文
posted @ 2017-04-02 09:39 清水汪汪 阅读(149) 评论(0) 推荐(1) 编辑