摘要: 这个取决于今早看耗子叔的微博: 这里说到了int的取值范围的问题,int的取值是-2147483648 ~ 2147483647,但是如果直接在编译器(VS2013)中使用-2147483648会报错: error C4146: 一元负运算符应用于无符号类型,结果仍为无符号类型 编译器(VS2013)在看到-2147483648时,会先做一个判断,就是先做一个2147483648 > INT_... 阅读全文
posted @ 2014-11-18 16:38 Tiny-Box 阅读(858) 评论(1) 推荐(1) 编辑
摘要: 因为我刷题是难度不是按发布日期,所以就有可能遇到这种情况,比如这个。。。Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal i... 阅读全文
posted @ 2014-11-18 13:40 Tiny-Box 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 这次我觉得我的智商太低,想了很久才写出来。题目是让求镜像二叉树判断,题目如下:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this... 阅读全文
posted @ 2014-11-18 12:57 Tiny-Box 阅读(150) 评论(0) 推荐(0) 编辑