1260. Shift 2D Grid

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

Given a 2D grid of size m x n and an integer k. You need to shift the grid k times. In one shift ope...

点击数:5 回复数:0

1252. Cells with Odd Values in a Matrix

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

Given n and m which are the dimensions of a matrix initialized by zeros and given an array indices w...

点击数:8 回复数:0

1232. Check If It Is a Straight Line

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

You are given an array coordinates, coordinates[i] = [x, y], where [x, y] represents the coordinate ...

点击数:7 回复数:0

1221. Split a String in Balanced Strings

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

Balanced strings are those that have an equal quantity of 'L' and 'R' characters. Given a balanced s...

点击数:6 回复数:0

1217. Minimum Cost to Move Chips to The Same Position

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

We have n chips, where the position of the ith chip is position[i]. We need to move all the chips to...

点击数:6 回复数:0

1207. Unique Number of Occurrences

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

Given an array of integers arr, write a function that returns true if and only if the number of occu...

点击数:3 回复数:0

1200. Minimum Absolute Difference

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

Given an array of distinct integers arr, find all pairs of elements with the minimum absolute differ...

点击数:3 回复数:0

1189. Maximum Number of Balloons

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

Given a string text, you want to use the characters of text to form as many instances of the word &q...

点击数:4 回复数:0

1185. Day of the Week

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

Given a date, return the corresponding day of the week for that date. The input is given as three in...

点击数:4 回复数:0

1184. Distance Between Bus Stops

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

A bus has n stops numbered from 0 to n - 1 that form a circle. We know the distance between all pair...

点击数:4 回复数:0