You're given an array containing both positive and negative
integers and required to find the sub-array with the largest
sum (O(N) a la KBL). Write a routine in C for the above.

Answer Posted / gopika

how to get O(N) for above program

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.

816


Define pre-condition and post-condition to a member function in c++?

895


What is encapsulation in c++ with example?

755


What is private public protected in c++?

746


On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?

883


How can I learn dev c++ programming?

780


Explain all the C++ concepts using examples.

935


What is the use of default constructor?

812


Explain the difference between new() and malloc() in c++?

851


What are single and multiple inheritances in c++?

781


Explain the problem with overriding functions

837


why is c++ called oops? Explain

809


How do you differentiate between overloading the prefix and postfix increments?

819


What are c++ manipulators?

813


Define vptr.

771