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…
Robotics and Programming Enthusiast on a journey to become a Robotics Software Engineer..