题解列表

筛选

汉诺塔-题解(Python代码)

摘要:解题思路:   如果要把n个环从i移动到j分为三个部分:    第一部分:        将前n-1个环移动到另一个柱子上,由于只有三根柱子且分别为1、2、3        =>i + j + 另一根……

树查找-题解(C++代码)

摘要:``` #include #include #include using namespace std; int main() {//思路为模拟二叉树的层次遍历 int n; in……