摘要: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree {3,9,20,#,#,15,7}, 3 / \ 9 20 / \ ... 阅读全文
posted @ 2015-10-16 14:58 dylqt 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 一、基本概念1、重载运算符是具有特殊名字的函数:由关键字operator和其他要定义的运算符号共同组成2、重载运算符的参数数量与该运算符作用的运算对象一样多当一个重载的运算符是成员函数时,this会绑定到左侧运算对象,成员运算符函数的显示参数数量比运算对象的数量少一个3、对于一个运算符函数,它要么是... 阅读全文
posted @ 2015-10-16 12:28 dylqt 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of... 阅读全文
posted @ 2015-10-16 09:30 dylqt 阅读(156) 评论(0) 推荐(0) 编辑