a recursive function to print all possible permutations of a given string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alemo91
    New Member
    • May 2010
    • 1

    #1

    a recursive function to print all possible permutations of a given string

    Write a recursive function to print all possible permutations of a given string. For
    example if the input string is “abc” then the set of permutations is: abc, acb, bac,
    bca, cab, cba. Hint: Generate all permutations that start with 'a',then 'b' then 'c'. To
    generate permutations starting with 'a', we need to find all permutations of "bc"
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    Hey, we did this homework question before!
    How much have you figured out so far? Do you have an algorithm in mind to do this?

    Comment

    • tlhintoq
      Recognized Expert Specialist
      • Mar 2008
      • 3532

      #3
      Bytes has a policy regarding assisting students with their homework.

      The short version is that the volunteers here can't help you with schoolwork.
      A) We don't know what material you have and have not learned in class.
      B) We don't know the guidelines you must follow.
      C) In the long run giving you the answers actually short changes your education.

      Hint 1: Try hitting Google with terms of your programming language and primary terms of what you want to do. For example "C# custom events" or "VB datagrid Excel". I've found this to be a very effective tool.
      Hint 2: Your text book
      Hint 3: Your instructor
      Hint 4: Posting guidelines regarding homework assignments.

      TIP: Read through the MSDN Library about each new control/method/area you are learning.

      Comment

      Working...