文章给出了1至N全排列问题的三种求解算法,分析了该问题在栈及二叉树计数中的应用。
This article gives three algorithms for all permutations of 1 to N, analyzing the application of this problem in stack and enumeration of binary tree.
假设你需用栈来实现遍历树的数据结构。
For example, imagine you need a data structure for tree traversal and choose to write a stack.
内容包括:数组、链接表、栈和队列、递归、树与森林、图、排序、检索和散列结构等。
The contents are included as follows: Array, Linked List, Stack and Queue, Recursion, Tree and Forest, Graph, Sorting, Indexing and Hashing Structure, etc.
应用推荐