Rob Stack
https://leetcode.com/problems/simplify-path/description/
once i understood the problem well, coming up with a solution wasn't that hard
stack = []
for dir_name in path.split('/'):
if dir_name == '..':
if stack: stack.pop()
elif dir_name == '' or dir_name == '.':
continue
else:
stack.append(dir_name)
return '/' + '/'.join(stack)
β‘4
Rob Stack
https://leetcode.com/problems/maximum-subarray/description/
This was my first accepted soln
but later i checked there is a better soln with less Runtime(9ms)
for num in nums[1:]:
cur_sum = max(num, cur_sum + num)
max_sum = max(max_sum, cur_sum)
return max_sum
but later i checked there is a better soln with less Runtime(9ms)
currSum = 0
maxSum = nums[0]
for num in nums:
if currSum < 0:
currSum = num
else:
currSum += num
if currSum > maxSum:
maxSum = currSum
return maxSum
β€1
Enough for today. I solved 10 problems all day, and if you want to solve more, check out my friend @bella_devs_squad. He's kind of a proπ
@R0bstack
@R0bstack
β€4π1π€―1π€1
Forwarded from Luna's pathwayπ€ (Luna)
Please open Telegram to view this post
VIEW IN TELEGRAM
π«‘6π₯1
Sup everyone π€,I am redoing LeetCode problems I did in the previous days, and this is what happened:
π―οΈsome of the problems I struggled to solve yesterday or the day before I solved easily today.
π―οΈStill, there are some problems I understand the concept and know how to solve, but I struggle with the implementation.
π―οΈThere are also some that make me wonder, did I really solve this oneπ€π?
Overall, I reinforced my learning, and I don't think I will miss these questions on interviewsπ€. I highly recommend you guys to redo LeetCode problems you solved yesterday before starting to solve new ones.
@R0bstack
π―οΈsome of the problems I struggled to solve yesterday or the day before I solved easily today.
π―οΈStill, there are some problems I understand the concept and know how to solve, but I struggle with the implementation.
π―οΈThere are also some that make me wonder, did I really solve this oneπ€π?
Overall, I reinforced my learning, and I don't think I will miss these questions on interviewsπ€. I highly recommend you guys to redo LeetCode problems you solved yesterday before starting to solve new ones.
@R0bstack
β€3β‘2π€2
Gov: You'll be a teacher next year.
Me: Sure, but make it IT and give me the lab key, or I'm ghosting π
#MEME@R0bstack
Me: Sure, but make it IT and give me the lab key, or I'm ghosting π
#MEME@R0bstack
π€5π4
Forwarded from Mr. SeeFun.Dev (Sifen)
Ever notice how some websites donβt tell you whether your email or password is wrong when you try to log in? They just say "Invalid credentials" with no details.Thatβs actually a security feature.
Itβs called User Enumeration Protection.
If a site tells you βemail not found,β attackers can test millions of emails and instantly know who has an account. So instead, websites use a generic message to keep your info safe.
@sifendev
Itβs called User Enumeration Protection.
If a site tells you βemail not found,β attackers can test millions of emails and instantly know who has an account. So instead, websites use a generic message to keep your info safe.
@sifendev
OOP.pdf
12.1 MB
Prepping for my OOP exam and suddenly remembering the PowerPoint I made last summer out of boredomπ€
π₯6π1
Forwarded from AI Programming
Google releasing Gemini 3, most intelligent model that helps bring any idea to life.
Reasoning Capabilities
Multimodal Understanding
Agentic Coding Abilities
Learn more about Gemini:
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯3
Forwarded from Solo codes (Brook Solomon)
What I'm watching the night before exam instead of doing either
https://youtu.be/idrbwnWLJ7w?si=Y46iNrkIpkGAWF9V
https://youtu.be/idrbwnWLJ7w?si=Y46iNrkIpkGAWF9V
YouTube
What staying up all night does to your brain - Anna Rothschild
Explore how pulling an all-nighter can impact your cognitive function, and find out what happens to your brain when you don't sleep.
--
Youβre just one history final away from a relaxing spring break. But you still have so much to study! You decide to followβ¦
--
Youβre just one history final away from a relaxing spring break. But you still have so much to study! You decide to followβ¦
π4
I finally played football after almost three years, and guess what? I broke my leg. π
I had so much to get done today, but i've been stuck in bed all day long. I'm barely able to walk right now.
Maybe i really shouldn't have played, lesson learned in hard way.
@R0bstack
I had so much to get done today, but i've been stuck in bed all day long. I'm barely able to walk right now.
Maybe i really shouldn't have played, lesson learned in hard way.
@R0bstack
π8β€1