摘要: 题目描述: Given a binary tree, return the postorder traversal of its nodes' values. 思路:利用栈,以及头插法进行操作 阅读全文
posted @ 2018-09-27 20:21 天剑含光 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another 阅读全文
posted @ 2018-09-27 19:49 天剑含光 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the near 阅读全文
posted @ 2018-09-27 19:39 天剑含光 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 今天面试,面试官给我出了一个题:100!尾部有多少个0 一般类似的题目都会蕴含某种规律或简便方法的,阶乘末尾一个零表示一个进位,则相当于乘以10,而10 是由2*5所得, 在1~100当中,可以产生10的有:2 4 5 6 8 结尾的数字,显然2是足够的,因为4、6、8当中都含有因子2,所以都可看当 阅读全文
posted @ 2018-09-27 09:46 天剑含光 阅读(2230) 评论(0) 推荐(0) 编辑