摘要: Given an array of integers, find out whether there are two distinct indicesiandjin the array such that the difference betweennums[i]andnums[j]is at mo... 阅读全文
posted @ 2015-10-17 16:05 eversliver 阅读(239) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers and an integerk, find out whether there are two distinct indicesiandjin the array such thatnums[i] = nums[j]and the differe... 阅读全文
posted @ 2015-10-17 14:41 eversliver 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 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 arr... 阅读全文
posted @ 2015-10-17 13:09 eversliver 阅读(258) 评论(0) 推荐(0) 编辑
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the... 阅读全文
posted @ 2015-10-17 12:13 eversliver 阅读(269) 评论(0) 推荐(0) 编辑
摘要: Given two stringssandt, write a function to determine iftis an anagram ofs.For example,s= "anagram",t= "nagaram", return true.s= "rat",t= "car", retur... 阅读全文
posted @ 2015-10-17 11:19 eversliver 阅读(324) 评论(0) 推荐(0) 编辑