Question from Google Online Test

Revision en1, by elite_c0der, 2021-07-12 20:34:29

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....

Tags google, google online test, #string

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English elite_c0der 2021-07-12 20:34:29 607 Initial revision (published)