A group of students wants to develop a calculator to reduce a fraction. The steps to do so are laid out in their math book as follows:
Express both the numerator (top number) and denominator (bottom number) as a product of their prime factors.
Strike out any common factors.
Multiply the remaining numbers to obtain the reduced numerator and denominator.
Which of the following elements would be appropriate to use in the algorithm?
A. two queues to pop out the prime factors for comparison
B. a queue and a stack to pop out the prime factors for comparison
C. two stacks to pop out the prime factors for comparison
D. two lists to hold the prime factors for comparison