1089. Duplicate Zeros

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

Given a fixed length array arr of integers, duplicate each occurrence of zero, shifting the remainin...

点击数:7 回复数:0

1078. Occurrences After Bigram

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

Given words first and second, consider occurrences in some text of the form "first second third...

点击数:7 回复数:0

1071. Greatest Common Divisor of Strings

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

For two strings s and t, we say "t divides s" if and only if s = t + ... + t (t concatenat...

点击数:11 回复数:0

1051. Height Checker

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

Students are asked to stand in non-decreasing order of heights for an annual photo. Return the minim...

点击数:10 回复数:0

1047. Remove All Adjacent Duplicates In String

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

Given a string S of lowercase letters, a duplicate removal consists of choosing two adjacent and equ...

点击数:9 回复数:0

1046. Last Stone Weight

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

We have a collection of stones, each stone has a positive integer weight. Each turn, we choose the t...

点击数:21 回复数:0

1037. Valid Boomerang

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

A boomerang is a set of 3 points that are all distinct and not in a straight line. Given a list of t...

点击数:22 回复数:0

1033. Moving Stones Until Consecutive

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

Three stones are on a number line at positions a, b, and c. Each turn, you pick up a stone at an end...

点击数:21 回复数:0

1030. Matrix Cells in Distance Order

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

We are given a matrix with R rows and C columns has cells with integer coordinates (r, c), where 0 &...

点击数:16 回复数:0

1022. Sum of Root To Leaf Binary Numbers

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

You are given the root of a binary tree where each node has a value 0 or 1. Each root-to-leaf path r...

点击数:18 回复数:0