上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 77 下一页
摘要: [抄题]: 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 阅读全文
posted @ 2018-08-06 09:58 苗妙苗 阅读(158) 评论(0) 推荐(0)
摘要: [抄题]: 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 阅读全文
posted @ 2018-08-05 20:49 苗妙苗 阅读(484) 评论(0) 推荐(0)
摘要: [抄题]: 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 阅读全文
posted @ 2018-08-05 09:28 苗妙苗 阅读(145) 评论(0) 推荐(0)
摘要: [抄题]: 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 阅读全文
posted @ 2018-08-04 23:14 苗妙苗 阅读(195) 评论(0) 推荐(0)
摘要: [抄题]: 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 阅读全文
posted @ 2018-08-04 21:57 苗妙苗 阅读(171) 评论(0) 推荐(0)
摘要: [抄题]: 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 阅读全文
posted @ 2018-08-04 20:56 苗妙苗 阅读(208) 评论(0) 推荐(0)
摘要: [抄题]: 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 阅读全文
posted @ 2018-08-04 15:09 苗妙苗 阅读(310) 评论(0) 推荐(0)
摘要: [抄题]: Let's play the minesweeper game (Wikipedia, online game)! You are given a 2D char matrix representing the game board. 'M' represents an unreveal 阅读全文
posted @ 2018-08-04 10:29 苗妙苗 阅读(380) 评论(0) 推荐(0)
摘要: [抄题]: 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 阅读全文
posted @ 2018-08-03 23:19 苗妙苗 阅读(188) 评论(0) 推荐(0)
摘要: [抄题]: 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 阅读全文
posted @ 2018-08-03 21:59 苗妙苗 阅读(234) 评论(0) 推荐(0)
上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 77 下一页