Dsa
Math
Easy
Decimal to Binary
Write a function that converts a given decimal number (base 10) into its binary representation (base 2). Do not use built-in functions.
Example Input:
10
Example Output:
1010
Key concepts
mathbase conversionloops
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now