上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 98 下一页
摘要: Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Note: The len 阅读全文
posted @ 2019-04-02 10:27 Veritas_des_Liberty 阅读(175) 评论(0) 推荐(0)
摘要: Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twi 阅读全文
posted @ 2019-04-01 12:03 Veritas_des_Liberty 阅读(217) 评论(0) 推荐(0)
摘要: 1029. Binary Prefix Divisible By 5 Given an array A of 0s and 1s, consider N_i: the i-th subarray from A[0] to A[i] interpreted as a binary number (fr 阅读全文
posted @ 2019-03-31 12:15 Veritas_des_Liberty 阅读(205) 评论(0) 推荐(0)
摘要: Given an array, rotate the array to the right by k steps, where k is non-negative. Example 1: Example 2: Note: Try to come up as many solutions as you 阅读全文
posted @ 2019-03-30 11:29 Veritas_des_Liberty 阅读(169) 评论(0) 推荐(0)
摘要: There are N piles of stones arranged in a row. The i-th pile has stones[i] stones. A move consists of merging exactly K consecutive piles into one pil 阅读全文
posted @ 2019-03-28 19:43 Veritas_des_Liberty 阅读(280) 评论(0) 推荐(0)
摘要: A subarray A[i], A[i+1], ..., A[j] of A is said to be turbulent if and only if: For i <= k < j, A[k] > A[k+1] when k is odd, and A[k] < A[k+1] when k  阅读全文
posted @ 2019-03-28 17:23 Veritas_des_Liberty 阅读(364) 评论(0) 推荐(0)
摘要: You are given an integer array A. From some starting index, you can make a series of jumps. The (1st, 3rd, 5th, ...) jumps in the series are called od 阅读全文
posted @ 2019-03-28 17:04 Veritas_des_Liberty 阅读(290) 评论(0) 推荐(0)
摘要: Given a string S, count the number of distinct, non-empty subsequences of S . Since the result may be large, return the answer modulo 10^9 + 7. Exampl 阅读全文
posted @ 2019-03-27 22:34 Veritas_des_Liberty 阅读(272) 评论(0) 推荐(0)
摘要: A chess knight can move as indicated in the chess diagram below: . This time, we place our chess knight on any numbered key of a phone pad (indicated 阅读全文
posted @ 2019-03-27 21:51 Veritas_des_Liberty 阅读(345) 评论(0) 推荐(0)
摘要: Given a square array of integers A, we want the minimum sum of a falling path through A. A falling path starts at any element in the first row, and ch 阅读全文
posted @ 2019-03-26 18:27 Veritas_des_Liberty 阅读(237) 评论(0) 推荐(0)
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 98 下一页