排序算法
小世界-_-
沉迷代码的程序媛
展开
-
排序算法之归并排序
参考:https://blog.csdn.net/yushiyi6453/article/details/76407640/** * @param arrays * @return */public static int[] mergeSort(int[] arrays, int[] copyarrays, int left, int right) { int length...原创 2018-11-26 18:23:46 · 100 阅读 · 0 评论 -
构建二叉树
func BuildTreeFromInOrderAndPreOrder(inorder, preorder []int) *NodeTree { return BuildTree(preorder, inorder, 0, len(preorder)-1, 0, len(inorder)-1)}func BuildTree(preOrder, inOrder []int, pres...原创 2019-08-19 19:13:10 · 193 阅读 · 0 评论 -
字符匹配Boyer-Moore算法,go实现
参考:https://blog.csdn.net/qpzkobe/article/details/80716922func TestBoyerMooer() { text := "helloword" patten := "ellowor" left, right := BoyerMooer(text, patten) right++ fmt.Println(t...原创 2019-08-22 18:40:18 · 169 阅读 · 0 评论