Answer the following computer-science fundamentals questions:
-
What are the time complexities (Big-O) of common sorting algorithms (e.g., bubble sort, insertion sort, selection sort, merge sort, quicksort, heap sort) in best/average/worst cases?
-
Compare arrays vs. linked lists. What are the time complexities of accessing an element, inserting at the head, and inserting in the middle?
-
Describe the full step-by-step process of inserting an element at the head of a dynamic array (e.g., vector/ArrayList), including what happens when the array needs to grow.
-
What is a hash table? Describe its underlying data structure and how collisions are handled.
-
What is the difference between a “hash table” and a “hash map” (conceptually and, if relevant, in common languages such as Java)?
-
What is the difference between a binary tree and a binary search tree (BST)?