this post was submitted on 14 Apr 2024
58 points (95.3% liked)

Memes @ Reddthat

1201 readers
1 users here now

The Memes community. Where Memes matter the most.

We abide by Reddthat's Instance Rules & the Lemmy Code of Conduct. By interacting here you agree to these terms.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] TootSweet@lemmy.world 5 points 1 year ago* (last edited 1 year ago) (3 children)

Question: Assuming you have two integers, x and y, with y bigger than x. Sum all the numbers from x to y.

Geordi La Forge Drake meme. Geordi makes a disgusted gesture at the solution that iterates to solve the problem and prefers the O(1) solution int sum = (y*(y+1) - x*(x-1))/2;.

The imprecision of the question itself bugs me, but I think the Geordi meme above has it right for the most reasonable reading of the question text.

Edit: Weird. On Jerboa, for me, this post has the image three times. On Lemmy-UI, only one. On both, the source text of the post is the same and doesn't appear to ahve any duplication. Weird Jerboa bug, I guess.

[–] SmoothLiquidation@lemmy.world 4 points 1 year ago

Usually interview questions are designed to be imprecise. It is a great way to see how the candidate handles it. Do they ask follow-up questions? Or do they just assume the details?

[–] fidodo@lemmy.world 2 points 1 year ago

I'd be perfectly happy for a candidate to do the second answer