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

In how many ways we can do exception handling in java?

564


Can list be null in java?

564


What are locale settings?

539


What are instance variables?

596


Write a program to check for a prime number in java?

546






What does sprintf mean?

519


What does  mean in regex?

560


What is jit and its use?

565


Explain method overloading?

562


Do extraneous variables affect validity?

515


What does += mean coding?

497


What is the byte order of byte buffer?

550


What are variable arguments or varargs?

558


What do negative exponents mean?

536


Which class should you use to obtain design information about an object in java programming?

633