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

What is BASIS

0 Answers  


what is the filters in biztakk server? where it can use?

0 Answers   Wipro,


what are the topics choosen for jam round for interviews

0 Answers  


Write a function which accepts a sentence as input parameter.Each word in that sentence is to be reversed. Space should be there between each words.Return the sentence with reversed words to main function and produce the required output. for eg:- i/p: jack jill jung kill o/p: kcaj llij gnuj llik

0 Answers   Mind Tree,


For a binary tree with n nodes, How many nodes are there which has got both a parent and a child?

0 Answers  






What is Meaning of Windows Application & the use of Windows Applications? with Description.

1 Answers  


we create a pf with 3 fields.2 is defined as keyfields.we lock it with alcobj command.how we find out whether the file is locked or not?is it dspfd??/

0 Answers   CTS,


what is the abap/4

1 Answers  


I want sample papers for NIC Examination. Plz send them to my mail Id das.neelam@gmail.com . Plz send it today, tomorrow i've the exam.

0 Answers  


what is the difference between read the data from table and infotype

0 Answers  


could u please also write an example of a code that involves instances from an abstract class just as u did for interfaces because u said it could also work which i really doubt. thanks

0 Answers  


how to add Servlet-api.jar file into eclipse 3.3.2 ?

0 Answers   IBM,


Categories