Sign in

Explanation of 4 different methods that aren’t the only way to do it.

So reversing words of a given sentence is a popular question in fresher interviews and I am guilty of not being able to do this one during my very first interview. As I chose C++ as the object-oriented language I was to interview in, I was asked to implement the above in C++. To be honest, I thought they asked me to reverse the given string, like for the string, “CPP is amazing”, the answer would be “gnizama si PPC”. On explaining my approach, the interviewer figured…

Wael Mohammed

Robotics and Programming Enthusiast on a journey to become a Robotics Software Engineer..

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