• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
April 23, 2024 |160 Views
SDE Sheet - Permutation of a given String
  Share   Like
Description
Discussion

This video is part of Recursion and Backtracking section under GFG SDE Sheet.

In this problem, we are given a string S. The task is to print all unique permutations of the given string that may contain dulplicates in lexicographically sorted order.

Example :

Input: ABC
Output:
ABC ACB BAC BCA CAB CBA
Explanation:
Given string ABC has permutations in 6 forms as ABC, ACB, BAC, BCA, CAB and CBA .

Try it out before watching the implementation of the problem in the video. We recommend watching the video, even if you can solve the problem. You may discover something new. All the best!!!

Do check out:-
Article: https://www.geeksforgeeks.org/write-a-c-program-to-print-all-permutations-of-a-given-string/
Problem: https://www.geeksforgeeks.org/problems/permutations-of-a-given-string2041/1
SDE Sheet Link: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/

Read More