leetcode
ksisfighting
这个作者很懒,什么都没留下…
展开
-
leetcode(94):Binary Tree Inorder Traversal
题目Binary Tree Inorder Traversal Given a binary tree, return the inorder traversal of its nodes’ values.For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [1,3,2].思路二叉原创 2015-06-21 20:41:36 · 408 阅读 · 0 评论 -
leetcode:Excel Sheet Column Title
题目Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example:1 -> A2 -> B3 -> C...26 -> Z27 -> AA28 -> AB 我的解法这个其实就是一个进制的转换,相当于将十进制转换为26进制,可以参考 Leet原创 2015-06-20 17:27:27 · 453 阅读 · 0 评论 -
leetcode:Excel Sheet Column Number
题目链接:Excel Sheet Column Number Related to question: Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its corresponding column number.For example:A -> 1B -> 2C -> 3.原创 2015-06-20 18:08:15 · 393 阅读 · 0 评论 -
leetcode:Linked List Cycle
题目Given a linked list, determine if it has a cycle in it.Follow up: Can you solve it without using extra space?我的解法想到bitmap的解法,但是在具体实现上还是出现了问题,我的纠结点如下:如果获取int的位数?我一开始理解,在64bit和32bit系统中,int原创 2015-06-20 19:12:54 · 522 阅读 · 0 评论 -
leetcode(145):Binary Tree Postorder Traversal
题目Binary Tree Postorder Traversal Given a binary tree, return the postorder traversal of its nodes’ values.For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [3,2,1].原创 2015-06-21 23:35:17 · 495 阅读 · 0 评论 -
leetcode:Populating Next Right Pointers in Each Node
题目Populating Next Right Pointers in Each Node Given a binary treestruct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next;}Populate each next pointer to point to its n原创 2015-06-22 02:03:48 · 437 阅读 · 0 评论