Problem · Array
Generate Array
Learn this problemProblem statement
Given a String array, return the output array in form where each word is first letter of that word with last letter of next (i+1)th index word.
eg = ["cat","dog","flower","bed"]
Output = ["cg","dr","fd","bt"]
Hi! Uber assessment comes with 4 coding questions.
Function
generateArray(words: String[]) → String[]Examples
Example 1
words = ["cat", "dog", "flower", "bed"]return = ["cg", "dr", "fd", "bt"]:)