摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
LeetCode——Single Number Question Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm sh 阅读全文
摘要:
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] 阅读全文
摘要:
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 阅读全文
摘要:
LeetCode——Reverse String Question Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "o 阅读全文
摘要:
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 阅读全文