摘要: Description: Given an integer array arr and an integer k, modify the array by repeating it k times. For example, if arr = [1, 2] and k = 3 then the mo 阅读全文
posted @ 2020-01-06 20:35 zhaoyinghe 阅读(220) 评论(0) 推荐(0) 编辑
摘要: Description: Given a circular array C of integers represented by A, find the maximum possible sum of a non empty subarray of C. Here, a circular array 阅读全文
posted @ 2020-01-06 19:50 zhaoyinghe 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Description There are n items each belonging to zero or one of m groups where group[i] is the group that the i th item belongs to and it's equal to 1 阅读全文
posted @ 2020-01-04 20:16 zhaoyinghe 阅读(435) 评论(0) 推荐(0) 编辑
摘要: Description You are given a square board of characters. You can move on the board starting at the bottom right square marked with the character 'S'. Y 阅读全文
posted @ 2019-12-29 15:05 zhaoyinghe 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给定一个无序数组arr,其中元素可正、可负、可0。给定一个整数k,求arr所有的子数组中累加和小于或等于k的最长子数组长度 要求 时间复杂度为O(n),空间复杂度为O(n) 示例 输入描述 第一行两个整数N, k。N表示数组长度,k的定义已在题目描述中给出 第二行N个整数表示数组内的数 输 阅读全文
posted @ 2019-12-27 12:11 zhaoyinghe 阅读(331) 评论(0) 推荐(0) 编辑