// Difficulty: MediumAccuracy: 40.66%Submissions: 199K+Points: 4Average Time: 20m // Given an array of integers arr[] representing a permutation, implement the next permutation that rearranges the ...
You are given a string s, which may contain duplicate characters. Your task is to generate and return an array of all unique permutations of the string. You can return the permutations in any order.