摘要:
[抄题]: Given a binary tree, flatten it to a linked list in-place. For example, given the following tree: 1 / \ 2 5 / \ \ 3 4 6 The flattened tree shoul 阅读全文
摘要:
[抄题]: Convert a BST to a sorted circular doubly-linked list in-place. Think of the left and right pointers as synonymous to the previous and next poin 阅读全文
摘要:
[抄题]: Given a (singly) linked list with head node root, write a function to split the linked list into k consecutive linked list "parts". The length o 阅读全文
摘要:
[抄题]: S and T are strings composed of lowercase letters. In S, no letter occurs more than once. S was sorted in some custom order previously. We want 阅读全文
摘要:
[抄题]: Given the root of a tree, you are asked to find the most frequent subtree sum. The subtree sum of a node is defined as the sum of all the node v 阅读全文
摘要:
[抄题]: Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary represen 阅读全文
摘要:
[抄题]: You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. Now, we define a pair (c, d) can fol 阅读全文
摘要:
[抄题]: Let's play the minesweeper game (Wikipedia, online game)! You are given a 2D char matrix representing the game board. 'M' represents an unreveal 阅读全文
摘要:
[抄题]: Given an array of integers A and let n to be its length. Assume Bk to be an array obtained by rotating the array A k positions clock-wise, we de 阅读全文
摘要:
[抄题]: A string S of lowercase letters is given. We want to partition this string into as many parts as possible so that each letter appears in at most 阅读全文