Showing 3 of 4 questions
Implement functions to encrypt a string using a given key and decrypt the encrypted string back to its original form. The encryption method involves substitutions based on the key.
#1. Encrypt and Decrypt Strings
Imagine a company where employees speak different languages. You need to teach a minimum number of people new languages so that everyone can communicate with at least one colleague.
#2. Minimum Number of People to Teach
You're given an array and a radius 'k'. Calculate the average of each subarray of length 2k+1 centered at each index, returning an array of these averages. If a subarray is too short (less than 2k+1 elements), mark its average as -1.
#3. K Radius Subarray Averages