摘要:
【题目】二叉树可以用常规的三种遍历结果来描述其结构,但是不够直观,尤其是二叉树中有重复值的时候,仅通过三种遍历的结果来构造二叉树的真实结构更是难上加难,有时则根本不可能。给定一棵二叉树的头节点head,已知二叉树节点值的类型为32位整型,请实现一个打印二叉树的函数,可以直观地展示树的形状,也便于画出 阅读全文
摘要:
Given a tree, you are supposed to tell if it is a complete binary tree. Input Specification: Each input file contains one test case. For each case, th 阅读全文
摘要:
Formation is very important when taking a group photo. Given the rules of forming K rows with Npeople as the following: The number of people in each r 阅读全文
摘要:
The basic task is simple: given N real numbers, you are supposed to calculate their average. But what makes it complicated is that some of the input n 阅读全文