• + 0 comments

    Here is my Java Code :)

    public static String encryption(String s) { // Write your code here StringBuilder str = new StringBuilder(""); int column = (int)Math.ceil(Math.sqrt(s.length())); s = s.replace("\s","").toLowerCase();

    for(int i =0;i < column;i++){
        for(int j = i;j < s.length();j += column){
            str.append(s.charAt(j));
        }
        str.append(" ");
    }
        return str.toString();
    }
    

    }