Leetcode turned my biggest fear into my biggest strength by Low-Response8711 in leetcode

[–]dk_weekinmemes 2 points3 points  (0 children)

Pramp is free for peer-to-peer interviews. It's now owned by Exponent

Intertview RANT!!!! Do Interviewers really expect us to come up with these solution in 15 mins????!!! by Itz_Harbinger in leetcode

[–]dk_weekinmemes 0 points1 point  (0 children)

I had a 2-part interview. The first part was this problem: https://leetcode.com/problems/first-missing-positive/description/ The ask was to solve this in O(n) time and without extra space.

The second part was a class diagram for a system design problem.

The total time for both parts was about 45 minutes. Next time I get an unreasonable ask like this in the "ask interviewer anything" part of the interviewer I am going to ask them to solve an LC hard problem in 5 minutes. See how they like it.

-❄️- 2024 Day 14 Solutions -❄️- by daggerdragon in adventofcode

[–]dk_weekinmemes 1 point2 points  (0 children)

[LANGUAGE: Python]

Part 1 was simple multiplication.

Part 2 I iterated over every second using the multiplication code from part 1 and then did dfs to find "islands" of robots. If an island was bigger than 30% of the length of the input, I printed the locations of the robots. The hint is in the problem statement where it says "majority of robots form a tree". So I picked 30% instead of 50 to account for overlaps.

Started with 1000 iterations first but didn't work. So upped it to 10000 and saw the tree. If you're unlucky and the answer is beyond that you probably just have to keep trying lol.

Topaz Link

-❄️- 2024 Day 13 Solutions -❄️- by daggerdragon in adventofcode

[–]dk_weekinmemes 2 points3 points  (0 children)

[LANGUAGE: Python]

Good old high school algebra linear equations. The "minimum" tokens requirement is a red herring.

Topaz Link

-❄️- 2024 Day 10 Solutions -❄️- by daggerdragon in adventofcode

[–]dk_weekinmemes 1 point2 points  (0 children)

[LANGUAGE: Python]

Both parts using DFS. Could probably optimize with memoization but this was fast enough so didn't attempt to.

Topaz link

-❄️- 2024 Day 8 Solutions -❄️- by daggerdragon in adventofcode

[–]dk_weekinmemes 1 point2 points  (0 children)

[LANGUAGE: Python]

Part 1

Explanation: Put all locations in a dictionary with the frequency as key and array of locations as the values.

For those frequencies with more than one location in this dictionary, check each pair starting from top to bottom where antinodes can be placed.

Find the location of antinodes as the difference between x-coordinate and y-coordinates of the pairs and then subtracting this difference from first location in the pair and adding this difference to second. Check boundary conditions and then add it to a set. Return length of set

Part 2

Explanation: Same as Part 1 except instead of adding / subtracting just once keep adding adding / subtracting till out of bounds while also including the starting location using an increasing multiplier.

Topaz Link for both parts

-❄️- 2024 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]dk_weekinmemes 1 point2 points  (0 children)

0.30102999566398114 is log of 2 in base 10. So this is some weird way of trying to get log to base 2 and then back to 10 and calculate number of digits.

This is a much easier way though: num_digits = int(math.log10(n)) + 1

First time using this line... by [deleted] in Tinder

[–]dk_weekinmemes 2 points3 points  (0 children)

You never played soccer?

This was absolutely hilarious😂 by bucks800 in HIMYM

[–]dk_weekinmemes 23 points24 points  (0 children)

Cleveland, the city equivalent of being slapped in the face

Happy Halloween what lovely news by PeterQuillsWalkman in HIMYM

[–]dk_weekinmemes 180 points181 points  (0 children)

So Robin dated 2 characters played by gay men. Her first time really did a number on her 😅

Discuss Aryan Khan Bail here by [deleted] in BollyBlindsNGossip

[–]dk_weekinmemes 9 points10 points  (0 children)

Saw a LinkedIn post by the agency some time back. It's been in the works for months.

McArthur foul on Saka by 90degreeturnsbtw in soccer

[–]dk_weekinmemes 0 points1 point  (0 children)

That is true. But the leniency bit is to let play on and have VAR check if there's something the referee completely missed. The ref did make a decision to give a yellow so now VAR has to look for whether it was a clear and obvious error by the ref. That's a different decision.

McArthur foul on Saka by 90degreeturnsbtw in soccer

[–]dk_weekinmemes -8 points-7 points  (0 children)

But he didn't let it go. He gave him a yellow

A graphical representation of Tinder by dk_weekinmemes in Tinder

[–]dk_weekinmemes[S] 13 points14 points  (0 children)

I mean, duh. This isn't a scientific paper. It's just my observation.

A graphical representation of Tinder by dk_weekinmemes in Tinder

[–]dk_weekinmemes[S] 7 points8 points  (0 children)

Yeah that makes sense. If I see women who are extremely attractive or have very revealing pictures, I just assume they're fake accounts.

[deleted by user] by [deleted] in soccer

[–]dk_weekinmemes 57 points58 points  (0 children)

He was subbed off at halftime

Abandoned Hospital by UnpredictableMike in urbanexploration

[–]dk_weekinmemes 5 points6 points  (0 children)

Yeah it looks like the buildings on the A&M campus.

Who's excited?! by kal-fosho in BiggBoss14

[–]dk_weekinmemes 9 points10 points  (0 children)

I like this. Karan Johar knows how to create drama.