# ComputerScience

for example in count sign sequences problem

I can calculate if length <28

but after that my program hangs (I use c++ (compiler g++) and my computer is a bit slow)

for example in count sign sequences problem

I can calculate if length <28

but after that my program hangs (I use c++ (compiler g++) and my computer is a bit slow)

No vote yet

1 vote

×

Problem Loading...

Note Loading...

Set Loading...

## Comments

Sort by:

TopNewestWell, that's the trick. You have to reduce the complexity of your code. For example, if you are solving the problem by evaluating every sequence of length 40, the computer would undergo enormous amount of calculations and that's not the way the designer of problem meant it to be solved. That's why number 40 is chosen to make the problem hard to solve. You might often think regarding many CS problems that its impossible to solve it by reducing it's calculations but many a times its surprisingly possible like in this problem. – Lokesh Sharma · 3 years, 3 months ago

Log in to reply

mostefficient algorithm, so that it can handle very large inputs such as these. – Maryann Vellanikaran · 3 years, 3 months agoLog in to reply