09 2017 档案

摘要:Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is constructed by these N numbers successfully if one of the following is true for the ith position (1 N: ... 阅读全文
posted @ 2017-09-29 22:39 xiejunzhao 阅读(341) 评论(0) 推荐(0)
摘要:You are given a data structure of employee information, which includes the employee's unique id, his importance value and his direct subordinates' id.For example, employee 1 is the leader of employee ... 阅读全文
posted @ 2017-09-29 22:30 xiejunzhao 阅读(436) 评论(0) 推荐(0)
摘要:You're now a baseball game point recorder.Given a list of strings, each string can be one of the 4 following types:Integer (one round's score): Directly represents the number of points you get in this... 阅读全文
posted @ 2017-09-25 00:01 xiejunzhao 阅读(1077) 评论(0) 推荐(0)
摘要:Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome.Example 1:Input: "aba" Output: True Example 2:Input: "abca" Output: True Explanation: You c... 阅读全文
posted @ 2017-09-19 23:26 xiejunzhao 阅读(506) 评论(0) 推荐(0)
摘要:Given a list of positive integers, the adjacent integers will perform the float division. For example, [2,3,4] -> 2 / 3 / 4.However, you can add any number of parenthesis at any position to change the... 阅读全文
posted @ 2017-09-16 11:18 xiejunzhao 阅读(209) 评论(0) 推荐(0)
摘要:Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly twoor zero sub-node. If the node has two sub-nodes, then this node's val... 阅读全文
posted @ 2017-09-10 17:40 xiejunzhao 阅读(640) 评论(0) 推荐(0)
摘要:Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R](R >= L). You might need to change the root of the tree, so the result... 阅读全文
posted @ 2017-09-10 17:31 xiejunzhao 阅读(1201) 评论(0) 推荐(0)
摘要:Given an unsorted array of integers, find the length of longest continuous increasing subsequence.Example 1:Input: [1,3,5,4,7] Output: 3 Explanation: The longest continuous increasing subsequence is [... 阅读全文
posted @ 2017-09-10 17:31 xiejunzhao 阅读(270) 评论(0) 推荐(0)
摘要:Winter is coming! Your first job during the contest is to design a standard heater with fixed warm radius to warm all the houses.Now, you are given positions of houses and heaters on a horizontal line... 阅读全文
posted @ 2017-09-02 00:23 xiejunzhao 阅读(205) 评论(0) 推荐(0)