Reverse Words in a String at Snapchat

Medium55.5% acceptance

This problem has 87.5% frequency at Snapchat.

Problem Description

Given an input string `s`, reverse the order of the **words**. A **word** is defined as a sequence of non-space characters. The **words** in `s` will be separated by at least one space. Return _a string of the words in reverse order concatenated by a single space._ **Note** that `s` may contain l...

Read full problem and hints

Topics

Also asked at 29 companies


More Snapchat Questions

View all Snapchat questions