码迷,mamicode.com
首页 >  
搜索关键字:element traversal    ( 13647个结果
Map, filter and reduce
To add up all the numbers in a list, you can use a loop like this: Total is initialized to 0. Each time through the loop, x gets one element...
分类:其他好文   时间:2014-07-16 19:29:14    阅读次数:234
Deleting elements
There are several ways to delete elements from a list. If you know the index of the element you want, you can use pop: pop modifies the list...
分类:其他好文   时间:2014-07-16 19:26:12    阅读次数:189
List exercise
The slice operator can take a third argument that determines the step size, so t[::2] creates a list that contains every other element from t. If the ...
分类:其他好文   时间:2014-07-15 09:12:42    阅读次数:328
LeetCode——Binary Tree Level Order Traversal 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 example: Given binary tree {3,9,20,#,#,15,7}, ...
分类:其他好文   时间:2014-07-14 17:31:14    阅读次数:229
LeetCode——Binary Tree Level Order Traversal
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,9,20,#,#,15,7}, 3 / 9 20 ...
分类:其他好文   时间:2014-07-14 17:29:03    阅读次数:166
[LeetCode]Binary Tree Inorder Traversal
[LeetCode]Binary Tree Inorder Traversal...
分类:其他好文   时间:2014-07-14 16:10:00    阅读次数:193
Remove Duplicates from Sorted Array
描述 Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in ...
分类:其他好文   时间:2014-07-14 13:46:43    阅读次数:229
Hierarchical Tree Traversal in Graphics Pipeline Stages
BACKGROUNDMany algorithms on a graphics processing unit (GPU) may benefit from doing a query in a hierarchical tree structure (including quad-trees, o...
分类:其他好文   时间:2014-07-13 19:47:28    阅读次数:289
List methods
Python provides methods that operate on lists. For example, append adds a new element to the end of a list, extend takes a list as an argument and app...
分类:其他好文   时间:2014-07-13 19:16:32    阅读次数:236
Binary Tree Preorder Traversal
Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [1,2,3]. /** * Definition for bi...
分类:其他好文   时间:2014-07-13 18:46:25    阅读次数:249
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!