Google Sample Question for google online coding challenge

Revision en2, by slayer_coder, 2021-07-22 07:14:38

Can somebody plz help me out with the following question-

You have been given a number say n and you have to do this following operation- find the resultant number which is formed by appending binary number of the first n positive numbers.

suppose n=4

1 in binary is 1

2 in binary is 10

3 in binary is 11

so finally the number formed is 1 10 11 or 11011->27's binary representation therefore the resultant number is 27

sorry for my bad explanation of the question

Tags #google, #hiringchallenge

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English slayer_coder 2021-07-22 07:17:37 14 Tiny change: 'mbers.\n\nsuppos' -> 'mbers.\n\n1<=n<=10^9\n\nsuppos'
en2 English slayer_coder 2021-07-22 07:14:38 57 Tiny change: 'er is 27\n[cut]\nsorry fo' -> 'er is 27\n\n\nsorry fo'
en1 English slayer_coder 2021-07-22 07:10:21 540 Initial revision (published)