Empty Slot/Gap Stack

Empty Slot/Gap Stack problems involve a vertical stack with multiple empty slots. You must determine positions of boxes and empties using constraints about gaps between boxes and relationships involving empties.

10Worksheets
200+Practice Questions
IntermediateDifficulty
2-3 hoursHours to Master

Introduction to Empty Slot/Gap Stack

Empty Slot/Gap Stack problems involve a vertical stack with multiple empty slots. You must determine positions of boxes and empties using constraints about gaps between boxes and relationships involving empties.

Prerequisites

Single stack basics Handling of empty positions Gap counting (including empties) Systematic elimination
Why This Matters: Empty Slot/Gap problems appear in 1-2 questions in Banking PO and SSC CGL exams. They test gap reasoning and positional logic.

How to Solve Empty Slot/Gap Stack Problems

1

Step 1: Determine total positions (N) and number of boxes (M)

2

Step 2: Identify known positions of boxes and empties

3

Step 3: Apply constraints about boxes (e.g., 'X and Y have exactly k entities between')

4

Step 4: Apply constraints about empties (e.g., 'T is immediately above second empty')

5

Step 5: Use elimination to determine positions of remaining boxes and empties

6

Step 6: Answer the specific question

Pro Strategy: Create a position array of length N. Mark known positions. Use gap constraints to determine relative positions. Test possible positions for unknown empties.

Example Problem

Example: 7 positions, 5 boxes P-T, 2 empties. Q at top, P at bottom. One empty at position 2. R and S have exactly 2 entities between. T immediately above second empty. Find T's position. Solution: Step 1: pos1=P, pos7=Q, pos2=Empty Step 2: Second empty at X, T at X+1 Step 3: Try X=4: T=5, R and S at 3 and 6 → between = positions 4,5 (Empty,T) = 2 entities ✓ Step 4: T at position 5 Answer: Position 5

Pro Tips & Tricks

  • Empty positions are 'entities' when counting between boxes
  • Total entities between positions = number of positions between them
  • Both boxes and empties count as entities
  • The 'second empty' refers to order by position number, not by any other property
  • Draw the stack with placeholders for unknown positions
  • Systematically test possible positions for unknown empties

Shortcut Methods to Solve Faster

If X and Y have exactly k entities between, then |pos(X)-pos(Y)| = k+1
The number of empties = total positions - number of boxes
Empties can be at ends unless constrained otherwise

Common Mistakes to Avoid

Counting only boxes between, not including empties
Assuming empties are consecutive
Misidentifying 'second empty' in position order
Not considering that empties can be at positions 1 or N

Exam Importance

Empty Slot/Gap Stack is an important topic for various competitive exams. Here's how frequently it appears:

SSC CGL
1-2 questions
BANKING PO
1-2 questions
RAILWAYS RRB
0-1 questions
CAT
0-1 questions
INSURANCE
1-2 questions

Ready to Master Empty Slot/Gap Stack?

Start with Worksheet 1 and work your way up to expert level! Each worksheet includes:

20 practice questions
Detailed solutions
Step-by-step explanations
Start Practicing Now