filmov
tv
LeetCode 557. Reverse Words in a String 3 || Java Solution Walkthrough

Показать описание
LeetCode is a great platform for people who want general coding practice, whether that be for interviews or just wanting to practice their problem solving. I will be taking you through all the steps of finding the optimal solution to each problem on the site following a logical ordering setout by LeetCode themselves.
In this video, we are going over the problem 557. Reverse Words in a String III and the goal is to go through the string that is given to us, and determine where each word starts and ends, and then reverse those words in place, so that only the words themselves are reversed, not the actual sentence.
This problem is an easier version of its big brother Reverse Words in a String where we had to keep the words the right way, but reverse their orders in the sentence. This time around, we also do not have to deal with any leading, trailing or extra spaces which was part of the added complexity of the previous problem. Again we are going to have to approach this in two steps, the first step will be determining what a word is, then after we have determined where a word is located, we can rotate that word, and move onto searching for the next word until there are no more left.
~~~ Stay Up To Date With My Social Media ~~~
Feeling Generous? Donate to the stream to help cover equipment and upgrade costs at:
#unknownkoder #leetcode #algorithms
In this video, we are going over the problem 557. Reverse Words in a String III and the goal is to go through the string that is given to us, and determine where each word starts and ends, and then reverse those words in place, so that only the words themselves are reversed, not the actual sentence.
This problem is an easier version of its big brother Reverse Words in a String where we had to keep the words the right way, but reverse their orders in the sentence. This time around, we also do not have to deal with any leading, trailing or extra spaces which was part of the added complexity of the previous problem. Again we are going to have to approach this in two steps, the first step will be determining what a word is, then after we have determined where a word is located, we can rotate that word, and move onto searching for the next word until there are no more left.
~~~ Stay Up To Date With My Social Media ~~~
Feeling Generous? Donate to the stream to help cover equipment and upgrade costs at:
#unknownkoder #leetcode #algorithms