📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      Consider generating all permutations of the string "ABC"

      using a backtracking approach. Which of the following sequences represents a valid path in the recursion tree, leading to a complete permutation?
      A A -> B -> C (ABC) Correct Answer Incorrect Answer
      B A -> C -> B (ACB) Correct Answer Incorrect Answer
      C B -> A -> C (BAC) Correct Answer Incorrect Answer
      D All of the above Correct Answer Incorrect Answer
      E None of the above Correct Answer Incorrect Answer

      Solution

      The correct answer is D

      Practice Next
      ask-question