Siemens Coding Question – Solved

5 Live
You are a part of the World of Wizards—a global society of magicians. It's your task to create a "warped-spell" that helps the society ensure the authenticity and secrecy of its members. All the members meet once a month at a secret club. In order to ensure the authenticity of members, each member is sent a "secret" number of 1-7 digits, 10 days before the meeting. On the meeting day, each member has to present a new "warped" number, which is made by casting a warped-spell on the "secret" received 10 days ago. The "warped" number must have the following magical attributes: 1. Must be strictly 4 - 7 digits in length, i.e., numbers from 1000 to 9999999. 2. Must always be greater than the secret itself. 3. Must have mirror-like characteristics, as shown below:

Asked in: Siemens

Image of the Question

Question Image Question Image

All Testcases Passed ✔



Passcode Image

Solution


Please login to view the solution


Related Questions

| Given an n x m grid, where rows are numbered from 7 to n and columns from 1 to … |
| There are 'N' coders standing in a line, where i denotes the ith position of a … |
| A birthday party was attended by N number of kids, and each kid was given a uni… |
| Given a matrix of size m * n, where m denotes the number of rows (starting with… |
| A traveler is traveling from the city of Zeta to Omega. He starts with X amount… |
| As an operations engineer at Amazon, you are responsible for organizing the dis… |