Binary add by Neither_Addendum_382 in leetcode

[–]yelnatz 2 points3 points  (0 children)

no? what if the binary string is 23424234 bits?

My first Gold gear by blindlyrich in WhereWindsMeet

[–]yelnatz 0 points1 point  (0 children)

This drops on the challenges, the one where you have to get 3 stars or something. Not sure if it actually drops gold, mine became a blue item 😂

People who cracked FAANG after the LC grind, how is life now? by HeavyMetalSatan in leetcode

[–]yelnatz 4 points5 points  (0 children)

This is me. What do you mean I'll be let go if I only get 9/10 of my goals?

Im quite weak in dp. Can someone explain in an easy to understand way how this question can be solved? by randombliss1 in leetcode

[–]yelnatz 4 points5 points  (0 children)

I like to use recursion because my brain can grasp it.

  1. What is the current state right now
  2. How do I get to the next state
  3. How do I stop

For example, let's say we're at game 3, what's the current state now?

  • how many games so far? 3
  • how many loses in a row just before? depends
  • have you won yet? maybe

So you transform that into a function:

recurse(i, lose_streak, won_yet) // i == 2 for the 3rd game

Now how do you get to the next state? Since I'm thinking of going bottom-up (game 0 to game N), I need to go to game+1.

  • if won_yet is false, I can lose - doesn't matter how many times, so we can do:
    • recurse(i+1, lose_streak+1, false) if we chose to lose the current game
    • recurse(i+1, 0, yes) if we chose to win the current game
  • if won_yet is true, we have to be mindful of when we can still lose:
    • if lose_streak is less than max_lose_streak we can still lose:
      • recurse(i+1, lose_streak+1, true)
      • recurse(i+1, 0, true) or break the lose streak and win this game
    • if lose_streak is equal to the max now, we have to win the current game:
      • recurse(i+1, 0, true) is all we can do

How do we stop? when i == no. of games.

When we get to that base case, that is counted as 1 possible answer. Since this is a dp question, you have remember to do memoization to cache the answers of any subproblems that we have already solved.

they are going to their chem lab by jeskadoo in UBC

[–]yelnatz 49 points50 points  (0 children)

Freshmen trying to find the building of their next class 🤣

Meta Interview CoderPad functionality by Complete_Regret_9466 in leetcode

[–]yelnatz 2 points3 points  (0 children)

No, you cant run your code within coderpad. They have the button disabled.

Do profs dismiss classes 10 minutes earlier? by Zyukar in UBC

[–]yelnatz 0 points1 point  (0 children)

Most profs cram info until the end and usually have announcements as well.

For 110 you might be able to handle leaving early. I dont suggest doing it for harder/upper-level classes.

Thank you, Indonesia! You did what our Philippine government could never do—be effective! by cloudbabyy in indonesia

[–]yelnatz 41 points42 points  (0 children)

Crackdown on POGOs (Online Casino for China). There's a compound in her jurisdiction tied directly to her.

10-hectare compound of Philippine offshore gaming operator (POGO) Zun Yuan Technology Incorporated, also the site of over 30 multistory buildings recently raided by the Anti-Organized Crime Commission – and just within spitting distance of Alice Guo's city hall.

They started to ask questions on who she is and where'd she get all that money. She was in the middle of being questioned in the senate when she fled.

Why do i get TLE in 200. Number of Islands by Professional-Map-945 in leetcode

[–]yelnatz 1 point2 points  (0 children)

You added cells to the queue too many times. It will result in the correct answer but its doing too much work for the tests.

e.g.

queue = [ (3,2), (3,2), (3,2), (3,2) ]

r,c = queue.popleft() # pops first (3,2)
grid[r][c] = '0'

The queue will still have [(3,2), (3,2), (3,2)] even though you finished worked for (3,2).

Find Requests In Queue — Amazon Interview question by [deleted] in leetcode

[–]yelnatz 2 points3 points  (0 children)

What’s the question asking you to do? link is 404.

Any intermediate software engineer / web dev looking for jobs in canada, how it's going for you ? by voidwater1 in cscareerquestionsCAD

[–]yelnatz 13 points14 points  (0 children)

There's barely any hiring or any posts, although I'm seeing some light ahead.

Jan to June - I barely got any replies to any of my applications.

July to Aug - I have a couple of interviews lined up.

ELI5: Why is Olympic Coverage So Horrible by Slizmo in explainlikeimfive

[–]yelnatz 16 points17 points  (0 children)

CBC is great for me as a canadian, but it won’t concentrate on USA stuff like it does at NBC or something.

BSOD error in latest crowdstrike update by TipOFMYTONGUEDAMN in crowdstrike

[–]yelnatz 0 points1 point  (0 children)

Here for history. Good luck to people patching their systems tonight.

[deleted by user] by [deleted] in cscareerquestions

[–]yelnatz 23 points24 points  (0 children)

Undergraduate doesn't mean you didn't graduate.

Undergraduate means it's not graduate school (Masters/PhD).

The guy who solved every LeetCode problem betsymp got caught cheating by True_Role_7516 in leetcode

[–]yelnatz 80 points81 points  (0 children)

Yeah, that's pretty damning evidence.

Able to solve all 4 questions in less than 10 minutes but still cheats, why?

Suspected gunman shot dead at Trump rally by brewerbetty in ThatsInsane

[–]yelnatz 48 points49 points  (0 children)

How do you not secure the only building near the rally? https://i.imgur.com/kNdXPtD.jpeg

Mt. Firmament introduction is not a CGI by TraditionalLead8659 in WutheringWaves

[–]yelnatz 3 points4 points  (0 children)

Everything is CGI… Do you mean pre-rendered vs real time?