What do you know about the big-o notation and can you give some examples with respect to different data structures?



What do you know about the big-o notation and can you give some examples with respect to different d..

Answer / Vishwajeet

Big O notation is a mathematical notation that describes the time complexity or space complexity of an algorithm. It provides upper and lower bounds on the performance of an algorithm as the size of the input grows. For example, searching for an element in an array (using linear search) has a time complexity of O(n), while searching in a sorted array has a time complexity of O(log n) due to binary search. Insertion into an ArrayList also has a time complexity of O(n) when adding elements at the beginning, but is O(1) when adding them at the end.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Does concurrenthashmap allow null?

1 Answers  


Differentiate between hashmap and hashtable.

1 Answers  


What is data in computer science?

1 Answers  


How do you sort an array in decreasing order?

1 Answers  


Which sorting algorithm is worst?

1 Answers  


When would you use a tuple?

1 Answers  


In which matrix, we can use multilinked structures?

1 Answers  


Can a hashset contain duplicates?

1 Answers  


Name two algorithms two find minimum spanning tree?

1 Answers  


What is merge sort in daa?

1 Answers  


Is Linked List 'linear' or 'Non-linear' data structure?

1 Answers   Accenture,


What are the tasks performed during postorder traversal?

1 Answers  


Categories