Binary Representation

Given a number N >= 0, find its representation in binary.

Example:

if N = 6,

binary form = 110

Problem Approach:

Complete code in the hint.

Interview Code Editor
Hints
  • Complete Solution
7142 successful submissions.
Click here to jump start your coding interview preparation