随笔分类 -  leetcode算法笔记

欢迎各位同仁赐教!
摘要:Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
posted @ 2016-07-14 13:40 Roger's 阅读(102) 评论(0) 推荐(0)
摘要:You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston 阅读全文
posted @ 2016-07-14 13:34 Roger's 阅读(191) 评论(0) 推荐(0)
摘要:Implement pow(x, n). 题目:求x的n次方 public class Solution { public double myPow(double x ,int n){ } } 解题感受:这道题目在leetcode上的Difficulty是Medium,其实也不比Easy难多少,除了 阅读全文
posted @ 2016-07-11 17:05 Roger's 阅读(593) 评论(0) 推荐(0)
摘要:Implement atoi to convert a string to an integer. Carefully consider all possible input cases. If you want a challenge, please do not see below and as 阅读全文
posted @ 2016-07-07 17:36 Roger's 阅读(680) 评论(0) 推荐(0)