Explain Big-O notation with an example

Answer Posted / hrindows@gmail.com

The Big-O notation depicts the performance of an algorithm as the number of elements in ArrayList. A developer can use Big-O notation to choose the collection implementation. It is based on performance, time, and memory.
For example, ArrayList get(index i) is a method to perform a constant-time operation. It does not depend on the total number of elements available in the list. Therefore, the performance in Big-O notation is O(1).

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between and ?

518


what is recursion in java

602


What are the 8 primitive data types in java?

554


What is meant by class and object in java?

562


What is the use of protected in java?

541






What about interrupt() method of thread class ?

597


How do you remove duplicates from an array in java?

536


What are basic keywords?

563


How do you sort arrays in java?

532


What is the list interface?

614


What does math floor () do?

563


how to create constants in java?

612


What is the difference between the size and capacity of a vector?

575


A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

548


Can java program run without jre?

577