[SOLVED] CSCI203-Assignment 2

20.99 $

Category:

Description

Rate this product

You are required to construct a program that will perform the following sequence of operations:

 

  • Reads a string and an integer, N, where the value of N is no larger than the number of characters in the string. (You may assume that the characters in the string are not repeated)
  • Generate and output all possible N-character permutations of the characters in the string.
  • Store the generated permutations, as they are calculated, in a 2-4 tree. Print the inorder traversal of the tree.

 

E.g.

Input  AbdDC 2

Output

Ab, Ad, AD, AC, bA, bd, bD, bC, dA, db, dD, dC, DA, Db, Dd, DC, CA, Cb, Cd, CD