Fibanocci increment series | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Fibanocci increment series

Increment mixed string is an operation which operates on two strings S1 and S2 of same length to generate a new string S3. The letters in odd position of S3 is one more than the corressponding letter in S1 and the letters in even position of S3 is one more than the corressponding letter in S2. For example, if S1 = ‘amey’ and S2 = ‘dhft’ then S3 = ‘bifu’. For letter ‘z’, letter ‘a’ is one more than it. Fibanocci increment mixed string is operation which operates on the last two strings in the series. Given two strings, S1 and S2 write a code to generate the nth element using Fibanocci increment mixed string operation. The given strings S1 and S2 are the first two elements in the Fibanocci increment mixed string series. Third element in the series is found by applying increment mixed string operation for first two elements. If S1 = ‘amey’ and S2 = ‘dhft’ then the first five elements in the series are as follows: amey dhft bifu ejgv ckgw My code : https://www.sololearn.com/compiler-playground/cxIN27xfmsiq

29th Nov 2022, 4:17 PM
Krishna Sarawagi
Krishna Sarawagi - avatar
1 Answer
0
Please help me make my code more efficient and reduce number of lines of code
29th Nov 2022, 4:18 PM
Krishna Sarawagi
Krishna Sarawagi - avatar