These Problems Made Me A Great Dev
Vložit
- čas přidán 5. 09. 2024
- GO SIGN UP FOR ADVENT OF CODE RIGHT NOW adventofcode.com/
I LOVE YOU MIR THANK YOU FOR MAKING THIS EDIT SO ABSURDLY FAST
Link to stream this was from: • STREAM VOD: I WAS WRON...
ALL MY VIDEOS ARE POSTED EARLY ON PATREON / t3dotgg
Everything else (Twitch, Twitter, Discord & my blog): t3.gg/links - Věda a technologie
Still cant over the guy that did last years AoC in PostgreSQL
wait, what now? lol
Just seen someone doing it in excel as well.
this is gonna be my first time participating in advent of code, pretty excited 😃
Same here! Day 1 was pretty easy thankfully
Advent should just crown Copilot their MVP already 😂
The timezone stuff sucks, for us in Europe this is early morning. So we pretty much can't compete if we have a job.
6 am is good for me xd
Always happy to see advent getting attention. They have some really great problems.
For part B, wouldn't this work and be simpler to implement:
declare a variable "count"
start iteration through all values of the array
if bracket is ")", count -= 1
else count += 1
if count == -1, return index (plus one, since 1-based index)
using a stack just seems to complicate the process
the stack is the textbook, most general solution to bracket matching algorithms, he probably came to that solution by googling/researching the problem
this is exactly what I thought. I would love to know the reason for his solution
@@ponirvea I give that a 0.000000000000000000000000000000000000000000000000000000000000000000000374% chance that that's what happened, because he almost certainly knew about this algorithm already. he used that solution either because of the pressures of being live (this was an old challenge, so points or speed didnt matter for a leaderboard) or because generally overthinks/overengineers things (or a combination of the both)
Yeah this is faster
Usually when there are "matches" in problems like this, the next part is more complex matching patterns. I've used this "chemical reduction" problem for interviews for years and it has caused slight brain rot adventofcode.com/2018/day/5
This is what I thought of... I'm glad I had a decent approach, usually suck at these
This is gonna kill my sleep schedule being on east coast, but worth it
I'm doing advent of code for the first time this year. I didn't realize then there was supposed to be time pressure. I just did the past few days challenges this morning because I put them off. Oh well, I've managed to get some good coder reuse going for some of the problems.
I dislike Leetcode, but I remembered the related Leetcode question for the parenthesis problem. I also remembered the related Leetcode question for this year's Day 1. Both were easy level, but useful for students to study.
Theo: "if you're a sub"
Me: "you sure i am"
For the slower ones: the sub here does not mean subscriber
DUDE , the bass drop at 5:10!!!! YES MAN it even got me dancing haha
inb4 the Rustaceans go into hyperdrive for 30 days
depending on how B is different from A... A's scalability score changes. which make me think that there is no point.
you can try to make A as generic as possible but no matter what you cannot guarantee that it would make B easier to code.
I think that AOC is not much different than LC.
Thanks for reminding me about AoC!
What about something like this, instead of a while loop:
let currentFloor = 0
let result = 0
for (let i = 0; i < brackets.length; i++) {
const char = brackets[i]
if (char === "(") currentFloor--
else if (char === ")") currentFloor++
if (currentFloor === -1) {
result = i
break
}
}
Yeah, this is the clear solution. Unfortunately Theo is not a good at solving these problems. He could've probably failed if it was his live-coding session during the interview. Anyways we still got a decent knowledge about frontend technologies.
Alright this sounds like a great way to brush up and level up on some skills!
I'd have run through the string with a for loop and done +1 floor for ( and -1 for ), until I hit -1 on floor.
"It's not about who's programming language is the best"
*disagrees in APL/J/BQN*
3:35 typical lisp codebase
That is awesome! Thnx 4 sharing :)
Thank you for this video
May you pls explain ,What ares the requirement for site like leet-code e.g. handling compilation for multiple users and run test against the solution?
There are a few good systems design videos on this:
czcams.com/video/hmoqH48JV00/video.html
They most likely use docker with networking disabled and other limits to make it more safe to run on their servers
can't sleep so I just completed the first day's challenges! pretty fun
copilot really solved the problem
i stopped watching after he let copilot just carry him
im doing this right now after a night shift to distress👌
I love to see fellow deadmau5 fans.
Vs code theme?
new theo vid W
Where are all my rustaceans at??
Roger Roger.
PepeLaugh dis gonna be good!
Their questions R clearer than leetcode
Music used?
Why not do it the functional way?
Such a great dev lmao
In excel??
Seems kinda weird if someone in a different timezone who's sleeping can never compete with it.
Wt is that vscode theme
nice
1:45
how you get that smart autocompletes?
Its called github copilot and it costs 10$/month
@@rauldragu9447 unless you are a student.. For them its free
tabnine has a free tier
@@rauldragu9447 Oh I completly forgot about that piece of software, thanks
@@abhishek.rathore ohhh thats great for me then, thanks
@theo 🤘🤘🤘
Its is good and I know they wanted a minimal design. But they should focus more on readability and ui just the minimum would suffice.
I hope you did not ask LC questions interviewing candidates as a SWE at Twitch if you complain about LC :)
Guy is straight up the definition of someone who has most definitely done the LC grind but talks like he hasn’t
tl;dw do advent of code
Self pro claimed "great" dev.
Boooo
Looking forward to your AoC livestream for comparison...
indicated by the bleached hair
Term great is relative tho
I don't think you are a great dev. Stop tooting your own horn. Playing with React is not programming! 😀
Let me know if you make it into top 200 any day in aoc because I got it for both problems today :)
I think he means better instead of great. But the word great has more power right? for more clicks 😀
Did you? I only see copilot doing the work for you@@t3dotgg
advent of code is really bad. Why!? well, day 1 problem 2. My code does everything that everyone else had problems with. But I am starting to think there is something wrong with the parsing of the data.. but who wants to check 1000 lines of text ? and even worse.. now I have to wait like 10 minutes before trying again. This is just a "Hey im so good coder" brag thing, and a really bad site that only accepts every 10 minutes. I hope someone does a adventure of code the right way, and not in this really bad way.
I haven't used leetcode ever.
i couldnt find the video where Theo @t3dotgg talks about LeetCode. would love a link if someone can provide it? PLEASE AND THANK YOU :)
nice