1122. Relative Sort Array

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

Given two arrays arr1 and arr2, the elements of arr2 are distinct, and all elements in arr2 are also...

点击数:507 回复数:0

1114. Print in Order

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

Suppose we have a class: public class Foo { public void first() { print("first"); } public...

点击数:547 回复数:0

1108. Defanging an IP Address

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

Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address...

点击数:521 回复数:0

1103. Distribute Candies to People

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

We distribute some number of candies, to a row of n = num_people people in the following way: We the...

点击数:467 回复数:0

1089. Duplicate Zeros

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

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

点击数:442 回复数:0

1078. Occurrences After Bigram

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

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

点击数:460 回复数:0

1071. Greatest Common Divisor of Strings

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

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

点击数:494 回复数:0

1051. Height Checker

作者:sryan 更新时间:2021-02-08 11:50 分类:数据结构与算法

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

点击数:417 回复数:0

1047. Remove All Adjacent Duplicates In String

作者:sryan 更新时间:2021-02-08 10:34 分类:数据结构与算法

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

点击数:446 回复数: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...

点击数:511 回复数:0