Data Structures Flashcards
What is the time complexity of SEARCH for an ARRAY?
O(n) - okay
What is the time complexity of INSERTION for an ARRAY?
O(n) - okay
What is the time complexity of DELETION for an ARRAY?
O(n) - okay
What is the worst space complexity of an array?
O(n) - okay
What is the time complexity of ACCESS of a STACK?
O(n) - okay
What is the time complexity of SEARCH of a STACK?
O(n) - okay
What is the time complexity of INSERTION of a STACK?
O(1) - great
What is the average time complexity of DELETION of a STACK?
O(1) - great
What is the worst space complexity of a STACK?
O(n) - okay
What is the time complexity of ACCESS of a LINKED LIST?
O(n) - okay
What is the time complexity of SEARCH of a LINKED LIST?
O(n) - okay
What is the time complexity of INSERTION of a LINKED LIST?
O(1) - great
What is the time complexity of DELETION of a LINKED LIST?
O(1) - great
What is the worst space complexity of a LINKED LIST?
O(n) - okay
What is the average time complexity of access, search, insertion, and deletion of a SKIP LIST?
O(log(n)) - good
What is the worst time complexity of access, search, insertion, and deletion of a SKIP LIST?
O(n) - okay
What is the worst space complexity of a SKIP LIST?
O(n log(n)) - bad!
What is the time complexity of ACCESS of a HASH TABLE?
Not applicable (why?)
What is the average time complexity of SEARCH, INSERTION, and DELETION of a HASH TABLE?
O(1) - great!
What is the worst time complexity of SEARCH, INSERTION, and DELETION of a HASH TABLE?
O(n) - okay