Problem · Array

Generate Array

EasyUberFULLTIMEOA
See Uber hiring insights

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.

Examples
01 · Example 1
words = ["cat", "dog", "flower", "bed"]
return = ["cg", "dr", "fd", "bt"]
:)
More Uber problems
drafts saved locally
public String[] generateArray(String[] words) {
  // write your code here
}
words["cat", "dog", "flower", "bed"]
expected["cg", "dr", "fd", "bt"]
sign in to submit