emirpasic / gods

GoDS (Go Data Structures) - Sets, Lists, Stacks, Maps, Trees, Queues, and much more
Other
16.32k stars 1.77k forks source link

Fix CircularBuffer example #246

Open sunreaver opened 7 months ago

sunreaver commented 7 months ago

When calling queue.Enqueue (4), the queue is full and will be calling queue.Dequeue --> queue. start++

so the queue.Peek will return queue.values[queue. start] is 2

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud