Explain Big-O notation with an example
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 |
What is the difference between yield() and sleep()?
What is use of static in java?
What is the difference between Array and Hash Table?
What are the different types of inheritance in java?
What is equlas() and hashcode() contract in java? Where does it used?
Why does java have two ways to create child threads?
What is aggregation?
What is object class in java?
what is inner class?
What is lambda expression in java?
Difference between Hash Table and Hash Map?
Hi Friends, I am beginner in java. what i know about synchonized keyword is,If more that one 1 thread tries to access a particular resource we can lock the method using synchronized keyword. Then after that how the lock is released and how next thread access that.Please explain with example.