Representing algorithms

EasyMediumHard
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
Question 44
Medium

Three cargo crates, PPP, QQQ, and RRR, are arranged on three platforms at a shipping dock as shown below.

Crates on platforms

The command MOVE(X, Y) relocates the single top crate from Platform X to the top of any crates already stacked on Platform Y.

State the final arrangement of the crates on Platform A, Platform B, and Platform C after the following algorithm is executed:

MOVE(B, C)
MOVE(B, A)
MOVE(C, A)

Your answer should clearly indicate which crates are on each platform, specifying the bottom-to-top order for any platform containing more than one crate.

[3]

Representing algorithms Questions

  1. GCSE
  2. /Computer Science
  3. /Representing algorithms