Sort Array By Parity II

作者:sryan 更新时间:2020-05-27 10:28 分类:数据结构与算法

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

点击数:688 回复数:0

Reverse Only Letters

作者:sryan 更新时间:2020-05-27 09:57 分类:数据结构与算法

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

点击数:588 回复数:0

X of a Kind in a Deck of Cards

作者:sryan 更新时间:2020-05-26 18:51 分类:数据结构与算法

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

点击数:548 回复数:0

Smallest Range I

作者:sryan 更新时间:2020-05-26 18:07 分类:数据结构与算法

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

点击数:522 回复数:0

Sort Array By Parity

作者:sryan 更新时间:2020-05-26 17:24 分类:数据结构与算法

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

点击数:580 回复数:0

Increasing Order Search Tree

作者:sryan 更新时间:2020-05-26 17:09 分类:数据结构与算法

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

点击数:549 回复数:0

Monotonic Array

作者:sryan 更新时间:2020-05-26 16:30 分类:数据结构与算法

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

点击数:601 回复数:0

Fair Candy Swap

作者:sryan 更新时间:2020-05-26 16:13 分类:数据结构与算法

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

点击数:630 回复数:0

Uncommon Words from Two Sentences

作者:sryan 更新时间:2020-05-26 15:18 分类:数据结构与算法

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

点击数:588 回复数:0

Middle of the linked list

作者:sryan 更新时间:2020-05-15 18:07 分类:数据结构与算法

Given a non-empty, singly linked list with head node head, return a middle node of linked list. If t...

点击数:658 回复数:0