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
- Total Palindrome Substring CostOA · Seen Jun 2026
- Earliest Time All Users Are ConnectedPHONE SCREEN · Seen May 2026
- Tournament Rounds by RankPHONE SCREEN · Seen May 2026
- Farthest Seat AssignmentONSITE INTERVIEW · Seen May 2026
- Convex Function MinimizationPHONE SCREEN · Seen May 2026
- Maximal Square AreaONSITE INTERVIEW · Seen May 2026
- First Unique IP Hitting the ServerPHONE SCREEN · Seen May 2026
- Jump Game with Prime-Step RuleOA · Seen May 2026
public String[] generateArray(String[] words) {
// write your code here
}
words["cat", "dog", "flower", "bed"]
expected["cg", "dr", "fd", "bt"]
sign in to submit