User Tools

Site Tools


queue_and_array

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

queue_and_array [2022/02/28 13:51]
scott
queue_and_array [2022/02/28 13:55] (current)
scott
Line 22: Line 22:
 {{ ::​queuetwopops.jpg?​300 |}} {{ ::​queuetwopops.jpg?​300 |}}
  
-As shown, ''​indexOut''​ has moved up two locations. Now, let's say that we want to "​push"​ two new values onto our queue. When "​pushing"​ a new value, the queue would need to check if it is full. It is not because, if indexIn is incremented and wraps around to location 0, it will not be equal to ''​indexOut''​ because ''​indexOut''​ now has the value of 2.+As shown, ''​indexOut''​ has moved up two locations. Now, let's say that we want to "​push"​ two new values onto our queue. When "​pushing"​ a new value, the queue would need to check if it is full. If indexIn is incremented and wraps around to location 0, it will not be equal to ''​indexOut''​ because ''​indexOut''​ now has the value of 2.
  
 Now, let's look at the queue after "​pushing"​ two new values (51.5 and 49.2). Now, let's look at the queue after "​pushing"​ two new values (51.5 and 49.2).
queue_and_array.1646081467.txt.gz ยท Last modified: 2022/02/28 13:51 by scott