Wrong framing of question

Wrong framing of question. Question says “Do not use extra space”. But in solution, you are using another variable (actually 2 variables) to calculate reverse of the number & store it. How does this not count as extra space? It makes sense if questions says, use constant space.

Click here to start solving coding interview questions