Queues Q.64

0. L:et m, n be positive integers. Define Q (m, n) as Q (m, n) = 0, if m>n Then Q (m, 3) is (a div b, gives the quotient when a is divided by b)

  • Option : C
  • Explanation : Let m>n. Let m/n yield a quotient x and remainder y. So, m= n*x+y and y<m div 3 is the quotient when m is divided by 3. So, that many times p is added, before we terminate recursion by satisfying the end condition Q (m,n) = 0 if m<n. Hence the result.
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 *