2015年9月14日

leetcode 258: Add Digits

摘要: 题目:Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like... 阅读全文

posted @ 2015-09-14 16:38 cainiao15 阅读(143) 评论(0) 推荐(0) 编辑

leetcode 104: Maximum Depth of Binary Tree

摘要: 题目: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... 阅读全文

posted @ 2015-09-14 16:32 cainiao15 阅读(104) 评论(0) 推荐(0) 编辑

leetcode 237: Delete Node in a Linked List

摘要: 题目:Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3... 阅读全文

posted @ 2015-09-14 16:26 cainiao15 阅读(126) 评论(0) 推荐(0) 编辑

导航