I'm trying to understand Big O concepts. It seems pretty abstract. I chose the most common data structures: an array, a hash, a linked list (single and double) and a binary search tree, and I guessed a bit in Big O notation for the most common operations - insert and search. This is a preparation for inerview. I need to learn only the basics that do not read the whole text on algorithms, although that would be ideal. Is the table below valid?
Data Structure Big O Search Big O Insert Array O(1) O(n) Hash O(1) O(1) Single Linked List O(n) O(1) Double Linked List O(n) O(1) Tree O(log n) O(log n)
user656925
source share