LeetCode - Plus One

LeetCode 的 Plus One 題目如下: Given a non-negative number represented as an array of digits, plus one to the number. ...

August 12, 2015 · 1 min · 292 words · Larry Nung

LeetCode - Valid Parentheses

LeetCode 的 Valid Parentheses 題目如下: Given a string containing just the characters ‘(’, ‘)’, ‘{’, ‘}’, ‘[’ and ‘]’, determine if the input string is valid. ...

August 11, 2015 · 1 min · 444 words · Larry Nung

LeetCode - Contains Duplicate III

LeetCode 的 Contains Duplicate III 題目如下: Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[j] is at most t and the difference between i and j is at most k. ...

July 28, 2015 · 1 min · 309 words · Larry Nung

LeetCode - Contains Duplicate II

LeetCode 的 Contains Duplicate II 題目如下: Given an array of integers and an integer k, find out whether there there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and j is at most k. ...

July 11, 2015 · 1 min · 316 words · Larry Nung

LeetCode - Contains Duplicate

LeetCode 的 Contains Duplicate 題目如下: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is distinct. ...

July 5, 2015 · 1 min · 215 words · Larry Nung