answersLogoWhite

0

if the objects in the knapsack are already being sorted then it requires only O(n) times to arrange the objects...so total time require by the knapsack problem is

T(n)=(nlogn) because sorting the objects require O(nlogn) time...Remaining is to run for n objects O(n). Hence, bounded by O(nlogn)

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Computer Science

What is a software engineering paradigm?

This is a dangerous question. The reason we have so many different paradigms is because no single one is the "most effective" in all general cases. You need to pick and choose for your various projects and problems.Saying that one is the "best" would show little more than the personal feelings of the person who answers it.


What is computational paradigm?

Pattern used by a programming language when describing a certain computation.


What advancement will be in computer after 40 years?

This is too far into the future to offer more than speculation. Computer have changed rapidly through the decades, and another massive paradigm shift is likely. So anyone telling you that they know what computers will be like 40 years from now is either lying or a time traveler.


What defines the behavior of an object in object-oriented programming and how is it implemented within the programming paradigm?

In object-oriented programming, the behavior of an object is defined by its methods, which are functions that describe what the object can do. This behavior is implemented by creating classes that define the structure and behavior of objects, and then creating instances of those classes to use in the program. The methods within the class determine how the object interacts with other objects and data in the program.


What is open source hardware?

Open source hardware is hardware that has the full specifications / datasheets and circuit diagrams available. They are usually licensed under either a permissive license or free for non-commercial use. Examples of open source hardware include the Arduino AVR board, OpenRISC, the OGD1 (an open source graphics card), VIA OpenBook, and the Vhumby.