1480. Running Sum of 1d Array

作者: 更新时间:2021-03-04 15:39 分类:数据结构与算法

Given an array nums. We define a running sum of an array as runningSum[i] = sum(nums[0]…nums[i]). Re...

点击数:0 回复数:0

1475. Final Prices With a Special Discount in a Shop

作者: 更新时间:2021-03-04 15:13 分类:数据结构与算法

Given the array prices where prices[i] is the price of the ith item in a shop. There is a special di...

点击数:0 回复数:0

1470. Shuffle the Array

作者: 更新时间:2021-03-04 11:44 分类:数据结构与算法

Given the array nums consisting of 2n elements in the form [x1,x2,...,xn,y1,y2,...,yn]. Return the a...

点击数:0 回复数:0

1464. Maximum Product of Two Elements in an Array

作者: 更新时间:2021-03-04 11:39 分类:数据结构与算法

Given the array of integers nums, you will choose two different indices i and j of that array. Retur...

点击数:0 回复数:0

1460. Make Two Arrays Equal by Reversing Sub-arrays

作者: 更新时间:2021-03-04 11:17 分类:数据结构与算法

Given two integer arrays of equal length target and arr. In one step, you can select any non-empty s...

点击数:0 回复数:0

1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence

作者: 更新时间:2021-03-04 11:07 分类:数据结构与算法

Given a sentence that consists of some words separated by a single space, and a searchWord. You have...

点击数:0 回复数:0

1450. Number of Students Doing Homework at a Given Time

作者:sryan 更新时间:2021-03-04 10:36 分类:数据结构与算法

Given two integer arrays startTime and endTime and given an integer queryTime. The ith student start...

点击数:304 回复数:0

1446. Consecutive Characters

作者:sryan 更新时间:2021-03-04 09:41 分类:数据结构与算法

Given a string s, the power of the string is the maximum length of a non-empty substring that contai...

点击数:371 回复数:0

1441. Build an Array With Stack Operations

作者:sryan 更新时间:2021-03-03 18:55 分类:数据结构与算法

Given an array target and an integer n. In each iteration, you will read a number from list = {1,2,3...

点击数:344 回复数:0

1437. Check If All 1's Are at Least Length K Places Away

作者:sryan 更新时间:2021-03-03 18:43 分类:数据结构与算法

Given an array nums of 0s and 1s and an integer k, return True if all 1's are at least k places away...

点击数:401 回复数:0