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
解决时钟问题,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
Decoding most of the infrared signals can be easily handled by PIC16C5X microcontrollers. This application note describes how this decoding may be done. The only mandatory hardware for decoding IR signals is an infrared receiver. The use of two types is described here. Both are modular types used often by the consumer electronics industry. The first type responds to infrared signals modulated at about 40 kHz. The second responds to non-modulated infrared pulses and has a restricted range. The hardware costs of each approach will be less than two dollars.
标签: microcontrollers Decoding infrared handled
上传时间: 2015-05-24
上传用户:ruan2570406
C++ Demystified: A Self-Teaching Guide by Jeff Kent ISBN:0072253703 McGraw-Hill/Osborne © 2004 This hands-on, step-by-step resource will guide you through each phase of C++ programming, providing you with the foundation to discover how computer programs and programming languages work.
标签: Self-Teaching Demystified McGraw-Hill 0072253703
上传时间: 2013-12-13
上传用户:1427796291
This example imports a text file into a database table using ADO. Because it uses ADO, it should work with all data sources, though it has only been tested with Access. Usage is explained in the code s comments.
标签: ADO database Because example
上传时间: 2013-12-27
上传用户:1079836864
This a simple genetic algorithm implementation where the evaluation function takes positive values only and the fitness of an individual is the same as the value of the objective function
标签: implementation evaluation algorithm function
上传时间: 2015-06-03
上传用户:2467478207
This class implements the same API as the Java 1.3 java.util.TimerTask. * Note that a TimerTask can only be scheduled on one Timer at a time, but * that this implementation does not enforce that constraint.
标签: TimerTask implements the class
上传时间: 2015-06-10
上传用户:无聊来刷下
DOS XMS library is a DOS real mode and large memory model C library. Because DOS is ran under real mode, programmer only can access RAM under 1MB
上传时间: 2015-06-13
上传用户:ANRAN
51串行令牌格式 a51编译 Read data from serial port and write into buffer DPTR pointed in XRAM if a data frame is received and calculate the check sum if a information frame is received return control byte only
标签: data pointed buffer serial
上传时间: 2015-06-14
上传用户:极客
The Hopfield model is a distributed model of an associative memory. Neurons are pixels and can take the values of -1 (off) or +1 (on). The network has stored a certain number of pixel patterns. During a retrieval phase, the network is started with some initial configuration and the network dynamics evolves towards the stored pattern which is closest to the initial configuration.
标签: model distributed associative Hopfield
上传时间: 2015-06-17
上传用户:l254587896