leetcode
文章平均质量分 56
张小水儿
这个作者很懒,什么都没留下…
展开
-
leetcode (228) Summary Ranges js代码实现
Summary Ranges Given a sorted integer array without duplicates, return the summary of its ranges. For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"]. 给出一个数组,找出其中连续的区间,比如例子中的,0到2原创 2015-12-21 13:30:57 · 389 阅读 · 0 评论 -
leetcode(303)Range Sum Query - Immutable js代码实现
leecode(303)Range Sum Query - Immutable js代码实现原创 2015-12-18 14:21:28 · 417 阅读 · 0 评论 -
leetcode(58)Length of Last Word js代码实现
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, return 0. Note: A word is原创 2015-12-18 14:28:02 · 357 阅读 · 0 评论 -
leetcode (5) Longest Palindromic Substring js代码实现
Longest Palindromic Substring Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic s原创 2015-12-19 01:16:45 · 635 阅读 · 0 评论 -
leetcode (1) Two Sum js代码实现
Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, whe原创 2015-12-19 21:22:48 · 1543 阅读 · 0 评论 -
leetcode (136) Single Number js代码实现
Single Number Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement i原创 2015-12-20 17:04:08 · 814 阅读 · 0 评论 -
leetcode (137) Single Number II js代码实现
Single Number II Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you im原创 2015-12-20 17:19:14 · 538 阅读 · 0 评论 -
leetcode (260) Single Number III js代码实现
Single Number III Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once.原创 2015-12-20 17:38:40 · 310 阅读 · 0 评论 -
leetcode (35) Search Insert Position js代码实现
Search Insert Position Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume原创 2015-12-20 19:29:39 · 650 阅读 · 0 评论
分享