The Code Shelf
Published in

The Code Shelf

CODING

Day 2: The “Reverse Words in a String” Problem

Problem:

Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters.

The input string does not contain leading or trailing spaces and the words are always separated by a single space.

Example:

Given s = "the sky is…

--

--

--

Well-curated thoughts about different programming paradigms, concepts etc., written with a cup of coffee

Recommended from Medium

Implementing React-JSS on Next.js Projects.

This month’s most useful tools for developers > January 2017

Angular by Failure: Quick Hit Guide

My 7 Favorite VS Code Extensions (That Aren’t Mentioned Yet)

Reusable, Restricted Routes with Redux, React, and React Router v4

What is JavaScript Canvas?

How to use flow in a mono-repo

JavaScript Type Conversions

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Anjana Sudhir

Anjana Sudhir

Senior Software Engineer & Scrum Master @ Agoda (Booking Holdings Inc.)

More from Medium

862. Shortest Subarray with Sum at Least K (Hard)

Why Optimal Sub-Structure Matter in Dynamic Programming?

Python3: Class and Instance Attributes — what are they and how do they work?

Median of 2 sorted array