2016年12月28日
摘要: package com.tree.find; public class TestSearchBST { private static class BiNode{ int data; BiNode lchild; BiNode rchild; } public static b... 阅读全文
posted @ 2016-12-28 21:44 wzyy 阅读(752) 评论(0) 推荐(0) 编辑
摘要: #include #include #include //顺序表查找 //从头到尾逐个比较,找到就返回下标,找不到返回0 //时间复杂度O(n) int Sequential_Search(int *array, int len, int key){ int i; array[0] = key; i = len; while(array[i] != key... 阅读全文
posted @ 2016-12-28 21:15 wzyy 阅读(323) 评论(0) 推荐(0) 编辑