Ninja and His Secret Information Encoding Problem
Ninja, a new member of the FBI, has acquired some 'SECRET_INFORMATION' that he needs to share with his team. To ensure security against hackers, Ninja decides to encode the information before sharing it. The goal is to help Ninja and his friends with the process of encoding and decoding the 'SECRET_INFORMATION'.
Input:
The input starts with an integer 'T', representing the number of test cases. Each of the next 'T' lines contains a string 'STR', which is the 'SECRET_INFORMATION' for that test case.
Output:
For each test case, determine if the encoding and then decoding process of the 'SECRET_INFORMATION' is successful. Print 'Transmission successful' if the decoded string matches the original 'SECRET_INFORMATION'. Otherwise, print 'Transmission failed'. Each result should be printed on a new line.
Example:
Suppose the input is:
2
hello
abc123
The output should be:
Transmission successful
Transmission successful
Constraints:
1 <= T <= 100
1 <= |SECRET_INFORMATION| <= 5000
Note:
The 'SECRET_INFORMATION' might contain any ASCII character. Do not use class members, global/static variables, or built-in library functions for decoding.
The task is to encode and decode 'SECRET_INFORMATION' for security purposes and determine if the transmission was successful.
Read the number of test cases 'T'
For each test case, encode the 'SECRET_INF...read more
Top Capgemini Data Analyst interview questions & answers
Popular interview questions of Data Analyst
Top HR questions asked in Capgemini Data Analyst
Reviews
Interviews
Salaries
Users/Month