菱纱梦

导航

2014年9月8日 #

Binary Tree Level Order Traversal <leetcode>

摘要: Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,9,2... 阅读全文

posted @ 2014-09-08 21:14 菱纱梦 阅读(151) 评论(0) 推荐(0) 编辑

Spiral Matrix II <leetcode>

摘要: Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following matri... 阅读全文

posted @ 2014-09-08 21:01 菱纱梦 阅读(153) 评论(0) 推荐(0) 编辑

Linked List Cycle II <leetcode>

摘要: Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?算法:... 阅读全文

posted @ 2014-09-08 20:29 菱纱梦 阅读(130) 评论(0) 推荐(0) 编辑