SIMPLIFY PATH | PYTHON | LEETCODE # 71

  Рет қаралды 2,527

Cracking FAANG

Cracking FAANG

Күн бұрын

Пікірлер: 8
@sarayarmohammadi3376
@sarayarmohammadi3376 Ай бұрын
Thank you
@SergioTomásVargasVillarreal
@SergioTomásVargasVillarreal Ай бұрын
Thanks a lot.
@subee128
@subee128 10 ай бұрын
Thanks
@dnm9931
@dnm9931 4 ай бұрын
Thanks so much! You’re amazing!
@joo02
@joo02 2 жыл бұрын
nice video. would be better if the coding screen can be zoomed in
@crackfaang
@crackfaang 2 жыл бұрын
Thanks for the feedback. I think this is the smallest I can get it while still maintaining 1080p recording and not cutting off the problem description part. Here is the code in case you had a hard time reading it on the video: class Solution: def simplifyPath(self, path: str) -> str: path_items = path.split("/") stack = [] for item in path_items: if item in [".", ""]: continue elif item == "..": if stack: stack.pop() else: stack.append(item) return "/" + "/".join(stack)
@ValentinoMarin
@ValentinoMarin 2 жыл бұрын
perhaps increase the font size
@rsKayiira
@rsKayiira 2 жыл бұрын
Great solution could you please do sliding window median LC 480
Accompanying my daughter to practice dance is so annoying #funny #cute#comedy
00:17
Funny daughter's daily life
Рет қаралды 20 МЛН
Simplify Path - Stack - Leetcode 71 - Python
12:47
NeetCode
Рет қаралды 62 М.
Simplify Path || Stack || C++/Java/Python || Leetcode - 71
12:58
Aryan Mittal
Рет қаралды 4,2 М.
LOWEST COMMON ANCESTOR OF A BINARY TREE I | PYTHON | LEETCODE 236
12:48
VALID NUMBER | LEETCODE #65 | PYTHON SOLUTION
18:18
Cracking FAANG
Рет қаралды 6 М.
Shortest Path in a Binary Matrix - Leetcode 1091 - Python
12:34
NeetCodeIO
Рет қаралды 27 М.
Simplify Path | Leetcode 71 | Stack | Day-14
17:39
Ayushi Sharma
Рет қаралды 10 М.
DOT PRODUCT OF TWO SPARSE VECTORS - 3 SOLUTIONS EXPLAINED [PYTHON]
31:06
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 5 МЛН
Maximum Swaps - Leetcode 670 - Python
15:40
NeetCodeIO
Рет қаралды 13 М.
Big-O Notation - For Coding Interviews
20:38
NeetCode
Рет қаралды 518 М.