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 |
How is hashset defined in java?
What is volatile keyword in java
Does java list allow null?
What is the list interface in java programming?
How many types of string data types are there?
What is static and a non-static inner class?
How many bits is a 64 bit byte?
What is the difference between Trusted and Untrusted Applet ?
Which collection object is faster to retrieving the data and inserting the data into it.
2 Answers Jamcracker, Virtusa,
What is a nested list?
In which order the iterator iterates over collection?
Explain the differences between abstraction and encapsulation?