Quick revision

| Auxiliary Space | extra space or temporary space used by an algorithm, excluding the space for the output

It does not use any data structures that grow with the input size, so the space complexity is O(1), which is constant. | | --- | --- | | Amortised | computes the average cost per operation over a (worst-case) sequence of operations by spreading occasional expensive steps across many cheap ones

• Although a single insert into a dynamic array may sometimes take O(n) when resizing, its amortised cost over n inserts is O(1). • Union-Find’s find uses path compression, giving O(α(N)) amortised per operation, which for practical N is constant. | | | | | | |


Technical coding test tips


Shortened "Strong Hire" Checklist (for quick reference)

🎯 Mindset of a Strong Hire:


Step 1: Restate and Confirm Understanding

Step 2: Clarify Inputs, Outputs, and Constraints

Step 3: Outline Test Cases (Including Edge Cases)