### DCP-381: MULTIPLICATION

Posted:

**Thu Nov 30, 2017 6:25 pm**How to solve this problem? Any hints or algorithm...

A happy hangout place for Dev Skill members

http://www.forum.devskill.com/

Page **1** of **1**

Posted: **Thu Nov 30, 2017 6:25 pm**

How to solve this problem? Any hints or algorithm...

Posted: **Sat Dec 02, 2017 1:59 pm**

You may think about dynamic programming.

There will be two transitions:

1.) take and multiply the value at index p.

2.) do not take value at index p.

There will be two transitions:

1.) take and multiply the value at index p.

2.) do not take value at index p.

Posted: **Sun Dec 03, 2017 10:55 pm**

But value can be very large, how to use this value as a state of DP?

Posted: **Tue Dec 05, 2017 2:02 am**

You have to find a formula.

Find a formula for fewer elements sets.You can use the formula larger elements sets

Find a formula for fewer elements sets.You can use the formula larger elements sets

Posted: **Tue Dec 05, 2017 9:33 am**

You just need to memorize "position" state to determine whether to take value at that position or not.

As the length of array is 1000. You can easily manage that in dp.

As the length of array is 1000. You can easily manage that in dp.

Posted: **Wed Dec 06, 2017 1:55 am**

Thanks everyone, including Rajib vai for helping me in this problem. AC...