05 2017 档案

摘要:Given an m * n matrix M initialized with all 0's and several update operations.Operations are represented by a 2D array, and each operation is represented by an array with two positive integers a and ... 阅读全文
posted @ 2017-05-31 00:10 xiejunzhao 阅读(125) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longestpath between any two nodes in a tree. This path may or may no... 阅读全文
posted @ 2017-05-29 00:29 xiejunzhao 阅读(237) 评论(0) 推荐(0) 编辑
摘要:You are given a string representing an attendance record for a student. The record only contains the following three characters:'A' : Absent.'L' : Late.'P' : Present.A student could be rewarded if his... 阅读全文
posted @ 2017-05-21 22:22 xiejunzhao 阅读(153) 评论(0) 推荐(0) 编辑
摘要:Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes.Example:Input: 1 \ 3 / 2 Output: 1 Explanation: The mini... 阅读全文
posted @ 2017-05-19 00:00 xiejunzhao 阅读(359) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, return the tilt of the whole tree.The tilt of a tree node is defined as the absolute difference between the sum of all left subtree node values and the sum of all right subtree no... 阅读全文
posted @ 2017-05-14 01:10 xiejunzhao 阅读(325) 评论(0) 推荐(0) 编辑
摘要:Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of the corresponding kind. You need to distribute these... 阅读全文
posted @ 2017-05-13 20:58 xiejunzhao 阅读(158) 评论(0) 推荐(0) 编辑
摘要:Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defined as the longest subsequence of one of these str... 阅读全文
posted @ 2017-05-02 23:52 xiejunzhao 阅读(119) 评论(0) 推荐(0) 编辑
摘要:In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data.You're given a matrix represented by a two-dimensi... 阅读全文
posted @ 2017-05-01 23:02 xiejunzhao 阅读(236) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示