All mock tests are FREE till 31 December — register to save your progress
Unit 7 · Data Structures and Algorithms Paper 2 CS · June 2024 (Cancelled)

Arrange the following prefix expressions by value in increasing order: A. + − * 2 / 8 4 3 2 B. ↑ − * 3 3 * 4 2 5 C. + − ↑ 3 2 ↑ 2 3 / 6 − 4 2 D. * + 3 + 3 ↑ 3 + 1 1 3

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. B, A, C, D

Explanation

A = (2 × 8/4 − 3) + 2 = 3. B = (3×3 − 4×2)⁵ = 1. C = (3² − 2³) + 6/(4 − 2) = 4. D = (3 + (3 + 3^(1+1))) × 3 = 45. Increasing: B, A, C, D.

More Data Structures and Algorithms questions