One is asking for a guesstimate, while the other is a proper optimisation problem. To me it's a valid interview question, albeit a bit difficult for a short session.
Maybe Google (and the other big tech companies using the same style of interview) is looking for the types who can brilliantly solve problems like that in 40 minutes, but they're instead going to hire a lot of guys who read the book of problems ahead of time.
A friend was obsessed with getting into FAANG and relentlessly drilled leetcode problems. There’s a whole community around it, basically memorizing enough toy problems that they can pass these interviews.
The companies should know by now that these clever problems aren’t really that clever. I have not interviewed in a long time but I think I’d get kind of depressed if an interviewer asked me 2sum. I’d just lose respect for the company.
But when you have the #1 name in the world for a brand, it's OK to throw out 99 good people for every 100 that apply.
A few years ago I did a round of interviews at Google. Despite what they say about not doing those kinds of questions anymore, they gave me a whole slew of them, in programming form. Not "how much would it cost to wash all the windows in NYC", but questions like "given a grid of land, each block having a price, pick the largest rectangle under $X".
If I'd heard of it before and knew the solution already, I did great. If I hadn't, I did poorly- but generally figured out the algorithm they wanted within a day- just not in the 45 minutes given. Alas, I guess I'm not "Googly" enough.