摘要: Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: (1)思想1:使用queue ,对二叉树进行层遍历。 C++: 阅读全文
posted @ 2017-12-18 22:07 西瓜刀刀刀 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo 阅读全文
posted @ 2017-12-18 21:47 西瓜刀刀刀 阅读(95) 评论(0) 推荐(0) 编辑