Open FanBu opened 6 years ago
Is it necessary that we ask the interviewer about the range? Like it's a integer beyond int's range?
Well, this is a question so rare to see in real interviews. The reason why I solve it is not to prepare for some specific questions but to accumulate some basic skills and patterns to solve more general questions. And if this is a real interview question, I think coming up with a fast and clear solution is the first important thing. And then there might be some follow-up questions as the range of integer. And in that case, I think Java will not handle it well due to its limit of integer while Python could be a better choice.
Great explanation! Thanks
https://fanbu.github.io/2018-02-12-39274.html