10 2018 档案

摘要:Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequ 阅读全文
posted @ 2018-10-28 21:16 Lin.B 阅读(220) 评论(0) 推荐(0)
摘要:Given an integer array with no duplicates. A maximum tree building on this array is defined as follow: The root is the maximum number in the array. Th 阅读全文
posted @ 2018-10-18 17:56 Lin.B 阅读(210) 评论(0) 推荐(0)
摘要:Given a binary tree, return the preorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,2,3] Follow up: Recursive s 阅读全文
posted @ 2018-10-18 15:10 Lin.B 阅读(108) 评论(0) 推荐(0)
摘要:Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and 阅读全文
posted @ 2018-10-18 14:47 Lin.B 阅读(147) 评论(0) 推荐(0)
摘要:Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used. Note: All letters in hexadec 阅读全文
posted @ 2018-10-16 19:41 Lin.B 阅读(195) 评论(0) 推荐(0)
摘要:Binary Tree Level Order Traversal Ⅰ Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by leve 阅读全文
posted @ 2018-10-12 21:59 Lin.B 阅读(156) 评论(0) 推荐(0)
摘要:Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Input:nums = 阅读全文
posted @ 2018-10-10 14:23 Lin.B 阅读(176) 评论(0) 推荐(0)
摘要:Given an integer, write a function to determine if it is a power of three. Example 1: Input: 27 Output: true Example 2: Input: 0 Output: false Example 阅读全文
posted @ 2018-10-08 20:55 Lin.B 阅读(145) 评论(0) 推荐(0)
摘要:Given a tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no left child and o 阅读全文
posted @ 2018-10-07 22:35 Lin.B 阅读(145) 评论(0) 推荐(0)
摘要:Consider all the leaves of a binary tree. From left to right order, the values of those leaves form a leaf value sequence. For example, in the given t 阅读全文
posted @ 2018-10-07 19:34 Lin.B 阅读(152) 评论(0) 推荐(0)
摘要:Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except n 阅读全文
posted @ 2018-10-07 14:00 Lin.B 阅读(118) 评论(0) 推荐(0)
摘要:Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of th 阅读全文
posted @ 2018-10-05 20:50 Lin.B 阅读(130) 评论(0) 推荐(0)
摘要:Given a binary tree, find the leftmost value in the last row of the tree. Example 1: Input: 2 / \ 1 3 Output: 1 Example 2: Input: 1 / \ 2 3 / / \ 4 5 阅读全文
posted @ 2018-10-04 20:37 Lin.B 阅读(102) 评论(0) 推荐(0)
摘要:Unique Paths Ⅰ A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or 阅读全文
posted @ 2018-10-02 21:47 Lin.B 阅读(116) 评论(0) 推荐(0)
摘要:Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. 阅读全文
posted @ 2018-10-02 17:37 Lin.B 阅读(135) 评论(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 one p 阅读全文
posted @ 2018-10-02 14:01 Lin.B 阅读(204) 评论(0) 推荐(0)