🎁 Exclusive Offer! Join our Telegram Channel to get **special discounts** and updates! 🚀

🚀 Struggling with coding interviews? We've got you covered! 💡 Practice real questions, sharpen your skills, and land your dream job! 🎯
Question 32 - 100% Working Solution | Buy Now

Description

3 Live
In order to ensure maximum security, the developers at Company employ multiple encryption methods to keep user data protected. In one method, numbers are encrypted using a scheme called 'Pascal Triangle'. When an array of digits is fed to this system, it sums the adjacent digits. It then takes the rightmost digit (least significant digit) of each addition for the next step. Thus, the number of digits in each step is reduced by 1. This procedure is repeated until there are only 2 digits left, and this sequence of 2 digits forms the encrypted number. Given the initial sequence of the digits of numbers, find the encrypted number. You should report a string of digits representing the encrypted number. Example: numbers = [4, 5, 6, 7]

Asked in: Amazon

Image of the Question

Question Image

All Testcases Passed ✔



Passcode Image

Solution


Please login to view the solution