58. Length of Last Word | O(N) traversal | Easy | C++ | Hindi

  Рет қаралды 147

Priyanshi Porwal

Priyanshi Porwal

3 ай бұрын

Your one stop for detailed explanation of LeetCode Weekly Contest Solutions from brute force to most optimized. Whether you're a seasoned programmer or just starting out, this video is for you.
Problem Link- leetcode.com/problems/length-...
Solution Link - github.com/preetu391/LeetCode...
Upsolving LeetCode problems is a great way to improve your coding skills! Join me in today's video as we tackle a new challenge and learn new techniques. Let's keep sharpening our problem-solving abilities together. 🚀❤️
Subscribe for daily LeetCode content as well as contest solutions!
Connect with me:
My LinkedIn- / priyanshi-porwal-8b919...
My Instagram- / coding._.cynics
My Github- github.com/preetu391
My telegram channel- t.me/codingcynics
Timestamps-
Hashtags
#developer #leetcode #leetcodesolutions #leetcodequestions #linkedlist #leetcodedailychallenge #leetcodedailychallenge #interview #technicalinterview
58. Length of Last Word
58. Length of Last Word C++
58. Length of Last Word solution
58. Length of Last Word Leetcode
58. Length of Last Word String
Length of Last Word
Length of Last Word C++
Length of Last Word solution
Length of Last Word Leetcode
Length of Last Word String
LeetCode daily challenge solution
LeetCode daily challenge editorial
LeetCode daily
Leetcode POTD
LeetCode solution
Leetcode
LeetCode practice
Interview Problems

Пікірлер: 7
@pankajvishwakarma3246
@pankajvishwakarma3246 3 ай бұрын
Great Explanation 💯💯
@preetu391
@preetu391 3 ай бұрын
Thank you!
@BadalKumar-gv3xu
@BadalKumar-gv3xu 3 ай бұрын
nice explanation
@preetu391
@preetu391 3 ай бұрын
Thanks!
@vinaymaurya9201
@vinaymaurya9201 3 ай бұрын
Nice explanation 😍
@preetu391
@preetu391 3 ай бұрын
Thank you!
@saiei
@saiei 3 ай бұрын
done class Solution { public: int lengthOfLastWord(string s) { //we will put a pointer on the back of the string int p=s.size()-1; int ans=0; //we will keep travelling back and skipping all spaces until we reach a char which is not a ' ' while(p>=0 && s[p]==' ') { p--; } //now since we are on a char we need to keep travelling until we get a space and each time we move we will count the size of the word while(p>=0 && s[p]!=' ') { p--; ans++; } return ans; } };
Nutella bro sis family Challenge 😋
00:31
Mr. Clabik
Рет қаралды 11 МЛН
ОСКАР ИСПОРТИЛ ДЖОНИ ЖИЗНЬ 😢 @lenta_com
01:01
Получилось у Вики?😂 #хабибка
00:14
ХАБИБ
Рет қаралды 7 МЛН
200. Number of Islands | Graph | DFS | BFS | C++ | Hindi
18:28
Priyanshi Porwal
Рет қаралды 169