@greghogg5: I LOVE This EASY Coding Interview Question! Length of Last Word - Leetcode 58 Crack big tech at algomap.io! #coding #leetcode #programming #interview

Greg Hogg
Greg Hogg
Open In TikTok:
Region: CA
Tuesday 01 July 2025 15:07:49 GMT
12073
355
37
3

Music

Download

Comments

oscareduardodiaz6
Oscar Eduardo Diaz :
wouldn't it be easier if you started in the back and just counted until you found a space
2025-07-01 15:32:46
20
gifted_otis
Otis 🇨🇦 :
Start at end of string. move toward beginning until you find a non-space. At this point count letters until you find a space.
2025-07-01 17:57:11
37
zacjack5
Zac :
String.strip, reverse the string, len of first array value after the reverse?
2025-07-23 03:04:31
0
jame5wood
I :
Start at end char, move back until next space, return count?
2025-07-02 12:55:55
0
potuler
potuler :
what about iterating from the end?....
2025-07-05 07:01:46
1
lionellopiccinno
Lionello Piccinno :
And why can't we keep going back from i until e we find the next space instead of starting again from the start?
2025-07-01 16:25:03
1
fo1go
Usevalad :
return len(s.split(' ')[-1])
2025-07-01 15:20:06
10
chris.tracks
Chris✌️🏳️‍🌈 :
return len(arr.rstrip().rsplit(" ", 1)[-1])
2025-07-01 19:55:35
0
sleepybutnottired
Sleepy guy :
Explode on space -> Array-> last->sizeof->array.
2025-07-01 18:48:09
0
isolate_scope
IsolateScope :
s.trim().match(/\S+$/)[0].length
2025-07-02 01:47:42
0
To see more videos from user @greghogg5, please go to the Tikwm homepage.

Other Videos


About