Long Pressed Name

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

Your friend is typing his name into a keyboard. Sometimes, when typing a character c, the key might ...

点击数:2 回复数:0

Sort Array By Parity II

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

Given an array A of non-negative integers, half of the integers in A are odd, and half of the intege...

点击数:3 回复数:0

Reverse Only Letters

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

Given a string S, return the "reversed" string where all characters that are not a letter ...

点击数:4 回复数:0

X of a Kind in a Deck of Cards

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

In a deck of cards, each card has an integer written on it. Return true if and only if you can choos...

点击数:5 回复数:0

Smallest Range I

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

Given an array A of integers, for each integer A[i] we may choose any x with -K <= x <= K, and...

点击数:4 回复数:0

Sort Array By Parity

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

Given an array A of non-negative integers, return an array consisting of all the even elements of A,...

点击数:1 回复数:0

Increasing Order Search Tree

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

Given a binary search tree, rearrange the tree in in-order so that the leftmost node in the tree is ...

点击数:2 回复数:0

Monotonic Array

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

An array is monotonic if it is either monotone increasing or monotone decreasing. An array A is mono...

点击数:2 回复数:0

Fair Candy Swap

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

Alice and Bob have candy bars of different sizes: A[i] is the size of the i-th bar of candy that Ali...

点击数:2 回复数:0

Uncommon Words from Two Sentences

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

We are given two sentences A and B. (A sentence is a string of space separated words. Each word cons...

点击数:3 回复数:0