Question: a Suppose that m is a constant Describe an O

a. Suppose that m is a constant. Describe an O (n)-time algorithm that, given an integer n, outputs the (n, m)-Josephus permutation.
b. Suppose that m is not a constant. Describe an O (n lg n)-time algorithm that, given integers n and m, outputs the (n, m)-Josephus permutation.

View Solution:


Sale on SolutionInn
Sales0
Views394
Comments
  • CreatedJuly 13, 2010
  • Files Included
Post your question
5000