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

When is the garbage collection used in Java?

880


What are the 3 types of loops in java?

721


What is regex java?

796


What is the function of character?

766


What is the basic of java?

779


What is array length in java?

725


Is main an identifier?

758


What is difference between variable declaration and definition?

738


How to reverse string in java?

852


Explain about wait() method?

781


What are the characteristics of Final,Finally and Finalize keywords.

931


What are the different http methods?

728


What are the legal parameters?

701


State one difference between a template class and class template.

840


What is the use of private static?

775