Conversion from decimal to other base numeral system and back.
Works for both bositive and negative base. The idea came after codility.com test issue from Toptal regarding simple conversion from decimal to base -2 and back.
Currently completed three solutions using C++ and PHP:
-
C++ - solved with extention of integer class running division and modulo operators for negative values.
-
C/C++ - similar solution to previous, but procedural, without integer extention class
-
PHP solution - similar to C/C++