Demo project that has 2 routes. I route is the incoming reference data that is popped into a sorted array held in ram. Other route is the number we are searching using a binary search tree. We are simply creating a large data buffer of numbers that will be searched
Route 1 - Accept the following post (number <int64>, channel _id <int>, UTC Time stamp>)
- Incoming data into redis queue
- popped into a sorted array
- sorted elements must reference back to channel_id and timestamp (pointer or hash)
Route 2 - incoming items to search against the reference library of numbers (number <int64>, user _id <int>, UTC Time stamp>
Use binary search tree which should be log2(N)
This is the tricky part now.
1 - If there is a match write the results out for now to terminal or log (we will do mysql later)
2 - If there is not match, permute 1 bit at a time and search the library again.
- flip bit 1, search, undo, flip bit 2, search undo, ..... flip bit 64, search undo
3 - If there is no match with 1 bit in error move to 2 bits in error
- flip bit 1 and bit 2, search, undo bit 2, flip bit 3 search, undo bit 3, .......
(this could be a nest loop)
- flipping bits is done via xor function. XOR(2^bit,num) where bit is from 0-63
Nodejs lib exists for circular buffer, bindery search tree etc.
3 pekerja bebas membida secara purata $93 untuk pekerjaan ini
Hi Client! Your project is very interesting for me and also I have good experience in your project. If you hire me, you will get the wonderful results you need. I will wait your response. Thanks for reading my bid.