上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页
摘要: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Note: 本题比较简单,代码如下: 阅读全文
posted @ 2017-03-03 09:12 CodesKiller 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Given an array nums and a target value k, find the maximum length of a subarray that sums to k. If there isn't one, return 0 instead. Note:The sum of 阅读全文
posted @ 2017-03-03 09:04 CodesKiller 阅读(141) 评论(0) 推荐(0) 编辑
摘要: You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a conca 阅读全文
posted @ 2017-03-03 07:49 CodesKiller 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example,S = "ADOBECOD 阅读全文
posted @ 2017-03-03 03:44 CodesKiller 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't 阅读全文
posted @ 2017-03-02 11:55 CodesKiller 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity. The definition of a celebrity is tha 阅读全文
posted @ 2017-03-02 02:02 CodesKiller 阅读(162) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted i 阅读全文
posted @ 2017-03-01 14:17 CodesKiller 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted f 阅读全文
posted @ 2017-03-01 11:57 CodesKiller 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array nums = [1,1,1,2,2,3], Your function sho 阅读全文
posted @ 2017-03-01 10:52 CodesKiller 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and t 阅读全文
posted @ 2017-03-01 08:22 CodesKiller 阅读(511) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页