Interview Solution

The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague. Edsger Dijkstra

Binary Decimal

Language Java | Level Intermediate | Category Interview Problems | July 24, 2015 4:52 pm


Interview Problem

Convert from Binary to Decimal and decimal to Binary number.
Write program to convert Decimal to Binary using stack and convert the binary number to decimal
Given binary 101
Return 5.0


Decimal converted to binary number:5
After converting to Binary:[1, 0, 1]

Binary Number to be convert to Decimal:101
After converting to Decimal:5.0



Please login to add comments.