I guess its case dependent but wouldn't overwriting the data at the current readIndex lead to inconsistent results? For example, in the animated diagram of the circular buffer, if the processor is busy but the user keeps typing, if they enqueue enough times to force an overwrite of the current read index, the data will be lost forever (due to a busy processor). I figure the example is sort of unlikely (since the buffer would either be large enough or the processor would be fast enough to avoid this), but wouldn't it make more sense to move unread data that's being overwritten to some other array? Or have multiple levels to a circular buffer?
I know Im randomly asking but does anyone know of a tool to get back into an Instagram account..? I was stupid lost the login password. I would appreciate any tricks you can give me.
@Gideon Jake i really appreciate your reply. I got to the site on google and Im waiting for the hacking stuff now. Seems to take a while so I will get back to you later with my results.
1:16 - 1:22 , this the why it's circular, it has fixed size like a circle and if the write pointer point to the same pointer as the read, it will overwrite 'stale' data, that hasn't been read.
quick, concise, and useful
good job! thanks bro
Thank you
Isn't it's better to use a simple array or arrayList?
I guess its case dependent but wouldn't overwriting the data at the current readIndex lead to inconsistent results? For example, in the animated diagram of the circular buffer, if the processor is busy but the user keeps typing, if they enqueue enough times to force an overwrite of the current read index, the data will be lost forever (due to a busy processor).
I figure the example is sort of unlikely (since the buffer would either be large enough or the processor would be fast enough to avoid this), but wouldn't it make more sense to move unread data that's being overwritten to some other array? Or have multiple levels to a circular buffer?
Just write until current readIndex - 1?
thanks for the explanation, very helpful
I know Im randomly asking but does anyone know of a tool to get back into an Instagram account..?
I was stupid lost the login password. I would appreciate any tricks you can give me.
@Ryland Ethan Instablaster ;)
@Gideon Jake i really appreciate your reply. I got to the site on google and Im waiting for the hacking stuff now.
Seems to take a while so I will get back to you later with my results.
@Gideon Jake it did the trick and I finally got access to my account again. I am so happy:D
Thank you so much, you saved my ass !
@Ryland Ethan Happy to help xD
Why is 8 overwritten at enqueue(17)? It has not been read yet and will now be overwritten adn "lost"?
1:16 - 1:22 , this the why it's circular, it has fixed size like a circle and if the write pointer point to the same pointer as the read, it will overwrite 'stale' data, that hasn't been read.
thanks
The sun is a circular buffer...i see it buffer everyday