We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have large numbers of records store in 24C256,4 bytes for 1 record. The record store in EEPRom is in sequence,and I want to find a record matched data from them. I now write a subfunction like following: First,I read record 1 form EEPRom,verify it and find if it is match my data. If match, return "1"(the record NO.);If no,I read record 2 ... and so on. If the last record is reached and it is still not the record I wanted,The function will return "0". Is this called Compare In Sequence Arithmetic? Routine will be very slowly when the matched record is in the back of EEPRom. The Dichotomy Arithmetic and Cut In Block Arithmetic cann't be use because of the record stored in EEPRom is random. Can you tell me a good arithmetic? Thank you.
Thank you very much,Drew Davis. I know Hash Table,It need more room to store data,I will try to find a good Hash Function. Thank you.
David, If the data is placed in memory in an ascending or descending structure then you could use a bisection algorithm. This algorithm will find your result in log2n tests. However, if the data is not in any order then you will probably have to use a linear or hash based algorithm.