上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 33 下一页
摘要: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
posted @ 2020-01-19 22:43 xuan_abc 阅读(157) 评论(0) 推荐(0)
摘要: Given an array of numbers, verify whether it is the correct preorder traversal sequence of a binary search tree. You may assume each number in the seq 阅读全文
posted @ 2020-01-19 12:19 xuan_abc 阅读(148) 评论(0) 推荐(0)
摘要: Given a binary tree, return the vertical order traversal of its nodes' values. (ie, from top to bottom, column by column). If two nodes are in the sam 阅读全文
posted @ 2020-01-18 23:17 xuan_abc 阅读(120) 评论(0) 推荐(0)
摘要: Given an array A of strings made only from lowercase letters, return a list of all characters that show up in all strings within the list (including d 阅读全文
posted @ 2020-01-18 11:29 xuan_abc 阅读(150) 评论(0) 推荐(0)
摘要: We are given two strings, A and B. A shift on A consists of taking string A and moving the leftmost character to the rightmost position. For example, 阅读全文
posted @ 2020-01-16 11:40 xuan_abc 阅读(155) 评论(0) 推荐(0)
摘要: Given a complete binary tree, count the number of nodes. Note: Definition of a complete binary tree from Wikipedia:In a complete binary tree every lev 阅读全文
posted @ 2020-01-16 10:21 xuan_abc 阅读(103) 评论(0) 推荐(0)
摘要: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the n 阅读全文
posted @ 2020-01-15 22:20 xuan_abc 阅读(98) 评论(0) 推荐(0)
摘要: Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, flip it up 阅读全文
posted @ 2020-01-15 12:22 xuan_abc 阅读(108) 评论(0) 推荐(0)
摘要: Given an array of n integers nums and a target, find the number of index triplets i, j, k with 0 <= i < j < k < n that satisfy the condition nums[i] + 阅读全文
posted @ 2020-01-15 11:44 xuan_abc 阅读(181) 评论(0) 推荐(0)
摘要: Given a binary tree, count the number of uni-value subtrees. A Uni-value subtree means all nodes of the subtree have the same value. Example : Input: 阅读全文
posted @ 2020-01-14 11:38 xuan_abc 阅读(126) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 33 下一页