Write the algorithm for deletion from a linear queue held in an array.
Queues
Original Khojo Papers practice question — not from a past board paper.
In a circular queue the last position is treated as adjacent to the first, so the rear pointer wraps round to the beginning when it reaches the end. It solves the problem of a linear queue in which repeated insertion and deletion leave the front positions unusable even though the queue is not full.
No citable source has been recorded for this record. Treat it as practice material, not as fact.
A dequeue allows insertion and deletion at both ends.
From the same topic and chapter, at a similar level.
Write the algorithm for deletion from a linear queue held in an array.
Queues
A linear queue held in an array of capacity 5 has front = 2 and rear = 4. How many elements does it hold, and can a further element be inserted?
Queues
What is a queue? State two differences between a stack and a queue.
Queues
Write a recursive Java method to compute the factorial of a non-negative integer n.
Recursion
State and verify the absorption law X + X·Y = X using a truth table.
Boolean Algebra
Convert the Boolean expression F(A, B, C) = Σ(1, 3, 5) into its canonical sum of products form.
Boolean Algebra