java - Anyway to break this double-ended queue? -


I have a line of double ending which is implemented with a circular array, such as the front point in front After the element and the previous element, the 'back' indicator indicates an element before they both are set to index 0.

  general: [x] [x] [] [] [] FR example: 1. [] [] [] [] [] FR 2. AddFirst 1 time [] [] [ ] [X] [X] [X] [X] [X] FR 4. Remove the first [] [X] [X] [X] [X] RF  

As you can see everything works well, but I am thinking that there is a way to break it. I am saying this because if I apply F and R to point to the first and the last elements, then whatever I did I have to break it. R Blank numbers which are not true. So I am thinking that whether this will ever happen in this implementation.

Context: I have cleared the checks to stop linking before or have emptied empty, the ability to add and delete is zero, and zero elements which are rejected in my implementation.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -