1518. Water Bottles

作者:sryan 更新时间:4 天前 分类:数据结构与算法

Given numBottles full water bottles, you can exchange numExchange empty water bottles for one full w...

点击数:5 回复数:0

1512. Number of Good Pairs

作者: 更新时间:4 天前 分类:数据结构与算法

Given an array of integers nums. A pair (i,j) is called good if nums[i] == nums[j] and i < j. Ret...

点击数:0 回复数:0

1507. Reformat Date

作者: 更新时间:4 天前 分类:数据结构与算法

Given a date string in the form Day Month Year, where: Day is in the set {"1st", "2nd...

点击数:0 回复数:0

1502. Can Make Arithmetic Progression From Sequence

作者: 更新时间:4 天前 分类:数据结构与算法

Given an array of numbers arr. A sequence of numbers is called an arithmetic progression if the diff...

点击数:0 回复数:0

1496. Path Crossing

作者: 更新时间:4 天前 分类:数据结构与算法

Given a string path, where path[i] = 'N', 'S', 'E' or 'W', each representing moving one unit north, ...

点击数:0 回复数:0

1491. Average Salary Excluding the Minimum and Maximum Salary

作者: 更新时间:4 天前 分类:数据结构与算法

Given an array of unique integers salary where salary[i] is the salary of the employee i. Return the...

点击数:0 回复数:0

1486. XOR Operation in an Array

作者: 更新时间:4 天前 分类:数据结构与算法

Given an integer n and an integer start. Define an array nums where nums[i] = start + 2*i (0-indexed...

点击数:0 回复数:0

1480. Running Sum of 1d Array

作者: 更新时间:4 天前 分类:数据结构与算法

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

作者: 更新时间:4 天前 分类:数据结构与算法

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

作者: 更新时间:4 天前 分类:数据结构与算法

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

点击数:0 回复数:0