elite_c0der's blog

By elite_c0der, history, 3 years ago, In English

Recently I have given the Google Online Test. There were 2 questions that are to be done in 1 hr. Even after the contest I am not able to solve the question and now I need help for this question.

Problem

You are given a string S of length n. The string S consists of characters 0's and 1's only. For each subsequence for string s, you need to find decimal representation and display the number of distinct decimal values of the subsequences. display answer%1000000007. 1<=T<=10 1<=n<=10^5 eg 1 3 110 output- 5 Any help will be appreciated. Thanks....

Full text and comments »

  • Vote: I like it
  • +38
  • Vote: I do not like it