no of integers between l and r such that binary representation of integer contains pattern 101

constraint : l<=r<=1e18

asked in past gfg hiring contest

pls share approach

@anon55659401 @vijju123 pls share approach

no of integers between l and r such that binary representation of integer contains pattern 101

constraint : l<=r<=1e18

asked in past gfg hiring contest

pls share approach

@anon55659401 @vijju123 pls share approach

search digit dp. Its standard problem

2 Likes

pls explain the approach behind this problem using digit dp !!