Four-parter in one question, which I wasn't expecting.
For each operation, identify the underlying data structure and the worst-case scenario that leads to the highest time complexity. State the complexity clearly and briefly justify it by explaining the operation's mechanics.
Pro tip: Mention that these are worst-case complexities and that average-case or amortized complexities can differ, showing awareness of practical performance.
For each of the four operations, note the data structure involved and what the operation entails.
Think about the least favorable configuration or state of the data structure that maximizes the time taken.
Based on the worst-case scenario, express the number of basic steps as a function of input size n, using Big-O notation.
Provide a one-sentence explanation for each complexity to demonstrate understanding.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.