We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Implementation
- Encryption
- Discussions
Encryption
Encryption
Sort by
recency
|
1498 Discussions
|
Please Login in order to post a comment
I've failed in the word "chillout". This word has 8 letters, so, it can take 3x3 and 2x4 matrix formats. The 2x4 is the one with a smaller area. My final answer was: "cl ho iu lt". But the validation routine says "clu hlt io", like it was 3x3 matrix.
Did you have problemns with this test too?
Here is problem solution in Python, Java, C++, C and Javascript - https://programmingoneonone.com/hackerrank-encryption-problem-solution.html
Javascript
public static String encryption(String s) { // Write your code here int size = s.length();
My Java solution with o(n * m) time complexity and o(n) space complexity: