Although there has been a lot of AVL tree libraries available now, nearly all of them are meant to work in the random access memory(RAM). Some of them do provide some mechanism for dumping the whole tree into a file and loading it back to the memory in order to make data in that tree persistent. It serves well when there s just small amount of data. When the tree is somewhat bigger, the dumping/loading process could take a lengthy time and makes your mission-critical program less efficient. How about an AVL tree that can directly use the disk for data storage ? IF there s something like that, we won t need to read through the whole tree in order to pick up just a little bit imformation(a node), but read only the sectors that are neccssary for locating a certain node and the sectors in which that node lies. This is my initial motivation for writing a storage-media independent AVL Tree. However, as you step forth, you would find that it not only works fine with disks but also fine with memorys, too.
标签: available libraries Although nearly
上传时间: 2014-01-22
上传用户:zhoujunzhen
词法分析器的构造方法,词法分析器能够识别一些关键字(如IF,else等)词法分析器能够识别一些运算符(如+,-,*,/等)词法分析器能够识别标识符
标签: 分析器
上传时间: 2015-05-19
上传用户:咔乐坞
解决时钟问题,acm竞赛题 A weird clock marked from 0 to 59 has only a minute hand. It won t move until a special coin is thrown into its box. There are dIFferent kinds of coins as your options. However once you make your choice, you cannot use any other kind. There are infinite number of coins of each kind, each marked with a number d ( 0 <= 1000 ), meaning that this coin will make the minute hand move d times clockwise the current time. For example, IF the current time is 45, and d = 2. Then the minute hand will move clockwise 90 minutes and will be pointing to 15. Now you are given the initial time s ( 0 <= s <= 59 ) and the coin s type d. Write a program to find the minimum number of d-coins needed to turn the minute hand back to 0.
标签: 时钟
上传时间: 2015-05-21
上传用户:rishian
数字运算,判断一个数是否接近素数 A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specIFy a number in another base b, and a number in base b is a Niven number IF the sum of its digits divides its value. Given b (2 <= b <= 10) and a number in base b, determine whether it is a Niven number or not. Input Each line of input contains the base b, followed by a string of digits representing a positive integer in that base. There are no leading zeroes. The input is terminated by a line consisting of 0 alone. Output For each case, print "yes" on a line IF the given number is a Niven number, and "no" otherwise. Sample Input 10 111 2 110 10 123 6 1000 8 2314 0 Sample Output yes yes no yes no
上传时间: 2015-05-21
上传用户:daguda
这是sun公司的程序员考试书籍(英文版的pdf) 还有模拟考试安装盘,和视频!我将稍后发布! READ THIS AGREEMENT CAREFULLY. IF YOU AGREE TO ALL THE TERMS AND CONDITIONS SET FORTH BELOW AND ARE WILLING TO BE LEGALLY BOUND BY THEM, PRESS THE I AGREE BUTTON TO CONTINUE WITH THE SETUP. IF YOU DO NOT AGREE TO SUCH TERMS AND CONDITIONS, PRESS THE I DON T AGREE BUTTON TO ABORT THE INSTALLATION.
上传时间: 2015-05-25
上传用户:ccclll
MFC Black Book Introduction: Are you an MFC programmer? Good. There are two types of MFC programmers. What kind are you? The first kind are the good programmers who write programs that conform to the way MFC wants you to do things. The second bunch are wild-eyed anarchists who insist on getting things done their way. Me, I’m in the second group. IF you are in the same boat (or would like to be) this book is for you. This book won’t teach you MFC—not in the traditional sense. You should pick it up with a good understanding of basic MFC programming and a desire to do things dIFferently. This isn’t a Scribble tutorial (although I will review some fundamentals in the first chapter). You will learn how to wring every drop from your MFC programs. You’ll discover how to use, abuse, and abandon the document/view architecture. IF you’ve ever wanted custom archives, you’ll find that, too.
标签: MFC Introduction programmer programme
上传时间: 2015-05-30
上传用户:youke111
These instructions assume that the 1.4 versions of the java and appletviewer commands are in your path. IF they aren t, then you should either specIFy the complete path to the commands or update your PATH environment variable as described in the installation instructions for the Java 2 SDK.
标签: instructions appletviewer the commands
上传时间: 2015-06-01
上传用户:3到15
2^x mod n = 1 acm竞赛题 Give a number n, find the minimum x that satisfies 2^x mod n = 1. Input One positive integer on each line, the value of n. Output IF the minimum x exists, print a line with 2^x mod n = 1. Print 2^? mod n = 1 otherwise. You should replace x and n with specIFic numbers. Sample Input 2 5 Sample Output 2^? mod 2 = 1 2^4 mod 5 = 1
标签: mod satisfies minimum number
上传时间: 2015-06-02
上传用户:qlpqlq
* Function: * 1. Replace the first oldstr with newstr in srcstr * Arguments: * IN : * srcstr * oldstr * newstr * OUT : * srcstr * Return: * 1. IF find and replace one oldstr with newstr in srcstr , return 1 * 2. IF find no oldstr in srcstr , return 0 * 3. IF error (malloc return NULL) return -1 * Notes: * 1. srcstr should be large size enough.
标签: Arguments Function Replace oldstr
上传时间: 2014-12-20
上传用户:Yukiseop
Routine mampres: To obtain amplitude response from h(exp(jw)). input parameters: h :n dimensioned complex array. the frequency response is stored in h(0) to h(n-1). n :the dimension of h and amp. fs :sampling frequency (Hz). iamp:IF iamp=0: The Amplitude Res. amp(k)=abs(h(k)) IF iamp=1: The Amplitude Res. amp(k)=20.*alog10(abs(h(k))). output parameters: amp :n dimensioned real array. the amplitude-frequency response is stored in amp(0) to amp(n-1). Note: this program will generate a data file "filename.dat" . in chapter 2
标签: dimensione parameters amplitude response
上传时间: 2013-12-19
上传用户:xfbs821