摘要: You need to construct a binary tree from a string consisting of parenthesis and integers. The whole input represents a binary tree. It contains an int 阅读全文
posted @ 2017-11-24 10:01 jxr041100 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree with n nodes, your task is to check if it's possible to partition the tree to two trees which have the equal sum of values after r 阅读全文
posted @ 2017-11-24 09:57 jxr041100 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Given an array A (index starts at 1) consisting of N integers: A1, A2, ..., AN and an integer B. The integer B denotes that from any place (suppose th 阅读全文
posted @ 2017-11-24 09:54 jxr041100 阅读(164) 评论(0) 推荐(0) 编辑
摘要: In combinatorial mathematics, a derangement is a permutation of the elements of a set, such that no element appears in its original position. There's 阅读全文
posted @ 2017-11-24 09:48 jxr041100 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer a, find the smallest positive integer b whose multiplication of each digit equals to a. If there is no answer or the answer i 阅读全文
posted @ 2017-11-24 09:30 jxr041100 阅读(206) 评论(0) 推荐(0) 编辑