Computer Science, asked by padiyarvaidoorya, 8 months ago

In a street, there are N houses build in a line. Each of the houses
contains some value in it. A thief is going to steal the maximum
value of these houses, but the thief can't steal in two
nearby(adjacent) houses because owner of the stolen houses will
tell his two neighbour(left and right side of his/her house). Guess
the maximum stolen value!!
For Ex:
If N=5
arr[= {7, 2, 4, 10, 6)
Output: 17
The thief will be stolen from houses having value of 7 and 10.
Because if he moves for 4 or 6, he won't able to get into 10.
Input format​

Answers

Answered by aksdnssg
0

Answer:

i did not understand your Question

Similar questions