⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interl.c

📁 一种类似于hash算法
💻 C
字号:
#include <stdlib.h>#include <Judy.h>main()	// Simple JudyL demo, see "run_demo" script; @(#) $Revision: 4.4 ${    Pvoid_t  Parray = (Pvoid_t) NULL;		// empty JudyL array.    Word_t * Pvalue;				// value for one index.    char     line[BUFSIZ];			// input line.    Word_t   index;				// in JudyL array.    printf("Interactive Judy demo program to input, sort, and list numbers.\n"	   "Enter a number:  ");  // fflush(stdout); ?    while (fgets(line, BUFSIZ, stdin))		// input.    {	index = strtoul(line, NULL, 0);		// note: bad input => 0.	JLI(Pvalue, Parray, index);		// insert index in JudyL array.	++(*Pvalue);				// count duplicates.	printf("       Index  Dups\n");		// print all saved indexes:	index = 0;				// start search at zero.	JLF(Pvalue, Parray, index);		// find first saved index.	while (Pvalue != NULL)	{	    printf("%12lu %5lu\n", index, *Pvalue);	    JLN(Pvalue, Parray, index);		// find next saved index.	}	printf("Next:  ");  // fflush(stdout); ?    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -