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?
@henrychan7203 жыл бұрын
Just write until current readIndex - 1?
@ajwausАй бұрын
Thank you
@simon-r2 жыл бұрын
Isn't it's better to use a simple array or arrayList?
@karenhompland76542 жыл бұрын
Why is 8 overwritten at enqueue(17)? It has not been read yet and will now be overwritten adn "lost"?
@gtav11632 жыл бұрын
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.
@tnczm3 жыл бұрын
thanks for the explanation, very helpful
@rylandethan49493 жыл бұрын
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.
@gideonjake64753 жыл бұрын
@Ryland Ethan Instablaster ;)
@rylandethan49493 жыл бұрын
@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.
@rylandethan49493 жыл бұрын
@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 !
@gideonjake64753 жыл бұрын
@Ryland Ethan Happy to help xD
@emmajennnings59202 жыл бұрын
thanks
@skisgy4 жыл бұрын
The sun is a circular buffer...i see it buffer everyday