review comments

This commit is contained in:
priyank-sriv
2020-06-21 03:06:32 +05:30
parent 9ba617bbf6
commit b018d2c6cd
2 changed files with 35 additions and 32 deletions
@@ -25,7 +25,7 @@ public class CircularBuffer<E> {
int nextWriteSeq = writeSequence + 1;
data[nextWriteSeq % capacity] = element;
writeSequence += 1;
writeSequence++;
return true;
}
@@ -37,7 +37,7 @@ public class CircularBuffer<E> {
if (isNotEmpty()) {
E nextValue = data[readSequence % capacity];
readSequence += 1;
readSequence++;
return nextValue;
}