I have written this permutation algorithm. Could you help me understand it\'s Time and Space Complexity.
public static List permutation(String s