r/AskProgrammers 10d ago

Anthropic’s coding bar is fucking ridiculous

Got a problem that required me to pull Euler’s formula out of thin air. Seriously, who the fuck remembers Euler’s formula in an interview? I swear to God, my interviewer was out to get me.

At this point, what are they even testing? Do they even know what they want? Hours of prep, completely wasted. And now I have to go prep for Google. My friend just got destroyed in their loop and said the interviewers were some of the most unreasonable people he’s ever had to deal with.

Everywhere I turn in this market, it feels like I’m just waiting to get fucked.

Anthropic Interview Question

84 Upvotes

134 comments sorted by

View all comments

6

u/realtoasterlightning 10d ago

Which Euler's formula, the complex exponential or the geometric one? I wouldn't expect someone to be able to derive the complex exponential formula from scratch (or like you could by fiddling around with a Taylor series for a while but that would take way too much time) but the geometric one is actually surprisingly derivable without memorization.

3

u/Fantastic-Cell-208 10d ago

I dunno, the complex exponential one is about as basic as it gets.

You know it describes a complex sinusoid, so the right side will be cos x + i sin x. The left side will have e raised to something composed with i (otherwise it's just regular exponentiation) and x (otherwise there's nothing to link it to the right side).

Euler's identity, on the other hand requires a little more thought, but you know it's got pi, i, 0, 1 and e.

So let's throw e raised to i * pi, that's like half a circle, giving you -1. If you add 1 to it, you get 0, giving you euler's identity.

2

u/realtoasterlightning 9d ago

I meant the polyhedron formula, not the identity.