会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Victor.Chang
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
下一页
2018年3月25日
【Java】快速排序、归并排序、堆排序、基数排序实现总结
摘要: 直接上代码,分析注释里import java.util.Arrays;public class Test{ public static void main(String[] agrs){ //int[] a =...
阅读全文
posted @ 2018-03-25 11:12 VictorChang
阅读(105)
评论(0)
推荐(0)
2018年3月24日
【Java】二分查找、插值查找、斐波那契查找的实现,及分析
摘要: public class Search { /**1.顺序查找 时间复杂度为:O(n) */ public static int SequenceSearch(int[] a, int x) { for(i...
阅读全文
posted @ 2018-03-24 14:32 VictorChang
阅读(130)
评论(0)
推荐(0)
2018年3月21日
【Java】Java实现常见的七种排序
摘要: /** 插入排序:直接,希尔 选择排序:选择排序,堆排序 交换排序:冒泡,快速 归并排序:归并*/public class Sort{ public static void main(String[] agrs...
阅读全文
posted @ 2018-03-21 15:34 VictorChang
阅读(147)
评论(0)
推荐(0)
2018年3月15日
【C】常见的排序
摘要: #include#include#include#include"Stack.h"typedef int DataType;void SortPrint(DataType*a,size_t n){ size_t ...
阅读全文
posted @ 2018-03-15 20:44 VictorChang
阅读(103)
评论(0)
推荐(0)
2018年3月4日
栈,迷宫问题
摘要: #include"Stack.h"#define N 6 int maze[N][N] = { {0,0,0,0,0,0}, {0,0,1,1,1,0}, {0,0,1,0,1,0}, {0,0,1,1,...
阅读全文
posted @ 2018-03-04 15:31 VictorChang
阅读(100)
评论(0)
推荐(0)
2018年3月2日
海量数据处理问题
摘要: 1.给一个超过100G大小的log file, log中存着IP地址, 设计算法找到出现次数最多的IP地址?将100G的log file分成1000份相同的Ip必定会在同一个小文件里在每个文件里找出出现次数最多的...
阅读全文
posted @ 2018-03-02 16:27 VictorChang
阅读(223)
评论(0)
推荐(0)
【C】 布隆过滤器BloomFilter
摘要: 在实现BloomFilter,首先实现一个位图;BitMap在位图中,每个元素为“0”或“1”,表示其对应的元素不存在或者存在。typedef struct BitMap { size_t* _bits; s...
阅读全文
posted @ 2018-03-02 14:46 VictorChang
阅读(100)
评论(0)
推荐(0)
2018年3月1日
哈希变形---位图
摘要: 1.给定100亿个整数,设计算法找到只出现一次的整数 2.给两个文件,分别有100亿个整数,我们只有1G内存,如何找到两个文件交集 3.1个文件有100亿个int,1G内存,设计算法找到出现次数不超过2次的所有整...
阅读全文
posted @ 2018-03-01 17:20 VictorChang
阅读(91)
评论(0)
推荐(0)
2018年2月28日
C实现Hash表,链式结构
摘要: typedef int KeyType; typedef int ValueType; typedef struct HashNode { KeyType _key; ValueType _value; s...
阅读全文
posted @ 2018-02-28 21:08 VictorChang
阅读(152)
评论(0)
推荐(0)
C实现Hash表,开放定址法
摘要: typedef int KeyType; typedef int ValueType; //用枚举来表示当前节点的状态typedef enum Status { EMPTY, //空 EXITS, //存在 D...
阅读全文
posted @ 2018-02-28 17:45 VictorChang
阅读(173)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
下一页
公告