Can you please explain what is the use of the array mk[256], how this array
solves the problem of repeated characters.
Does there exist any better solution also, or this backtracking solution is
the best?
--
You received this message because you are subscribed to the Google Groups
Algorithm
how to find all permutations of string with repeated characters.like aabc.
--
Regards,
Kamakshi
kamakshi...@gmail.com
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To
how to find all permutations of string with repeated characters.like
aabc.
idea is backtracking, complexity isn't very good
#include cstdio
#include cstring
using namespace std;
const int MX = 1000;
char str[MX], sol[MX];
bool seen[MX] = {0};
void print(int n, int k=0) {
if(k==n) {