Oracle interview question

Program for all permutations of given string

Interview Answer

Anonymous

Dec 17, 2019

public static Sect permute(String str) { Set Perm = new Hashset(); if(Str==null || Str =="") { perm.add("") return perm } else String initial = Str.charAt(0); String substr = Str.substring(1); Setword = permute(substr ); for(String snew word) { for(int i =0;i Perm = permute(s); for(String s1 :Perm) sysout(s1); }