Given an array all of whose elements are positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array. So 3 2 7 10 should return 13 (sum of 3 and 10) or 3 2 5 10 7 should return 15 (sum of 3, 5 and 7)


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Programming Languages AllOther Interview Questions

is it possible to desable particular parameter of the normal orcle report based on some condition ?????? if yes,wht is the function for desabling a parameter...

0 Answers  


What is autocall macro and how to create autocall macro? what is the use of it?

0 Answers   GE,


Which tag is used to break a line

3 Answers  


if we want to move all the items that are already added in a combobox into an empty list box or vice-versa then how can it possible in vb or C# ?

1 Answers  


I have try to write a record in a TDQ from a fle.... what are the steps to do... can anybody plz come with a solution

0 Answers  


Write a program to show polymorphism.

0 Answers   Genpact,


Write a Pseudo Code to find the angle between two hands of a clock for a given time.

6 Answers   Goldman Sachs, HCL,


what is the difference between primary key and unique key?

2 Answers   KTree, TCS,


What is the difference between WebIntelligence and Designer in creating universes?

0 Answers  


how many logical drive we can form to physical device in our computer?

1 Answers   nvidia,


. With the help of above table EMP, perform the following operation is sql. a) Add the new column “DEPTNO” b) Rename the table c) Update table d) Modify the table if column ‘SAL’ whose data type is number (10) and you want to enter varchar2 (15) . For example $USD 20 etc.

2 Answers  


what is the difference between a looping statement and a decision statement

4 Answers  


Categories