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 purpose of find feature?
What is the difference between this() and super() in java?
Need to use public,static keywords in main function?
Why is singleton not thread safe?
Difference between overloading and overridding?
Can subclass overriding method declare an exception if parent class method doesn't throw an exception?
What is covariant return type?
Can we override private constructor in java?
Explain purpose of sleep() method in java?
Is it safe for adding 10,00,000 records/objects to HashMap?, i.e is it safe to add millions of objects to HashMap?
Is static a keyword in java?
How to sort an array in java without using sort method?