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

how many types of Inheritance?

945


How do you declare a variable?

852


How can an exception be thrown manually by a programmer?

743


How do you find the absolute value?

814


What is the exception hierarchy in java?

742


Can a class have a static inner class?

834


What is integer parseint?

740


Is empty list java?

728


What is a static method in java?

778


What is the difference between static and global variables and also define what are volatile variables?

821


What is a singleton factory?

740


Difference between static binding and dynamic binding?

803


What is an anonymous class in java?

800


What are constants?

822


Is set thread safe java?

713