Sale
Summer Offer: $190/yr $99/yr
00 : 00 : 00 : 00
Get this deal
Backend Engineer Senior programming

Create a function that returns all possible permutations of a given string, ensuring that no permutation is repeated in the result.


Constraints:


  • The input string will only consist of lowercase English letters. Its length will not exceed 8 characters.


Examples:


1. Input: 'a'
Output: ['a']
2. Input: 'aba'
Output: ['aab', 'aba', 'baa']
Suggested Answer

Trusted by 100+ professionals preparing for interviews

Trusted by 100+ professionals 50+ Company Question Banks 5+ Supported Languages

Practice More Questions Like This

Generate unlimited interview questions with structured answers, code runner, and AI-powered walkthroughs.

Get Started Free
Link copied to clipboard