码迷,mamicode.com
首页 >  
搜索关键字:nodes    ( 4030个结果
spoj Query on a tree(树链剖分模板题)
375. Query on a tree Problem code: QTREE You are given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered 1, 2, 3...N-1. We will ask you to perfrom ...
分类:其他好文   时间:2014-09-16 16:00:20    阅读次数:312
Leetcode Binary Tree Zigzag level Order Traversal
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and ...
分类:其他好文   时间:2014-09-16 15:32:10    阅读次数:243
LeetCode:Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:其他好文   时间:2014-09-16 13:57:50    阅读次数:163
LeetCode 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 le...
分类:其他好文   时间:2014-09-16 00:15:49    阅读次数:196
LeetCode:Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.思路:增加一个头指...
分类:其他好文   时间:2014-09-15 22:38:49    阅读次数:217
LeetCode Clone Graph
Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are labeled uniq...
分类:其他好文   时间:2014-09-15 21:09:39    阅读次数:216
Leetcode: Binary Tree Level Order Transversal II
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For e...
分类:其他好文   时间:2014-09-15 14:13:38    阅读次数:153
Leetcode: Binary Tree Level Order Transversal
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree {3,...
分类:其他好文   时间:2014-09-15 14:07:38    阅读次数:175
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:其他好文   时间:2014-09-15 12:41:48    阅读次数:133
Leetcode: Binary Tree Inorder Transversal
Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,3,2]....
分类:其他好文   时间:2014-09-15 09:54:08    阅读次数:135
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!