Interview Question

Правка en1, от gXa, 2017-05-08 16:35:00

I got solutions on internet but it is quite difficult to understand. Plz can someone explain this.

You are given an integer N. You have to find smallest multiple of N which consists of digits 0 and 1 only. Since this multiple could be large, return it in form of a string.

Note: - Returned string should not contain leading zeroes.

For N = 55, 110 is smallest multiple consisting of digits 0 and 1. For N = 2, 10 is the answer. See Expected Output

Теги bfs, 0-1 bfs, #graph

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский gXa 2017-05-08 16:35:26 23 Tiny change: 'he answer.\nSee Expected Output\n' -> 'he answer.'
en1 Английский gXa 2017-05-08 16:35:00 494 Initial revision (published)