摘要:
二叉树实现、及遍历 二叉树定义 type Student struct { Name string left* Student right* Student } 如果每个节点有两个指针分别用来指向左子树和右子树,我们把这样的结构叫做二叉树 package main import "fmt" type 阅读全文
摘要:
1、冒泡排序 package main import "fmt" func bsort(a []int) { for i := 0; i < len(a); i++ { for j := 1; j < len(a)-i; j++ { if a[j] < a[j-1] { a[j], a[j-1] = 阅读全文