PA of Algorithms Q123

  • Option : A
  • Explanation :
    By definition, T(9) = Dist. From 9 to 100 As given, T(9) = 1+min (T(y), T()(z) = 1 + min (Dist. from y to 100, Dist. From z to 100)
    ⇒ 1 = Dist. from 9 to y/Dist. From 9 to z
    ⇒ There are only two such values-one is the simple one step on number line i.e. 10, and the other is the shortcut associated with 9 i.e. 15.
    ⇒ Therefore, y and z are 10 and 15 (in any order)
    ⇒ Product yz = 150.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *