iosNudge

Swift for Coding Interviews

The Swift you need for algorithm rounds: strings, collections, data structures, patterns and ready-to-use templates.

Start reading
0/6 chapters read0%
  1. 01
    Strings

    How Swift strings work, how to index them fast, the everyday operations, and the performance traps that turn O(n) into O(n²).

  2. 02
    Collections

    Array, Dictionary, Set and tuples in Swift, sorting with closures, reduce, zip, enumerated, 2D arrays, and the Big-O of each operation.

  3. 03
    Building Blocks

    Swift has no built-in stack, queue, deque or heap. Here is how to write each one quickly, plus linked lists, tree nodes and graph adjacency lists.

  4. 04
    Patterns

    When to use two pointers, sliding window, hashing, binary search and prefix sums, with a short Swift template for each.

  5. 05
    Trees and Graphs

    DFS and BFS on trees, graphs and grids (recursive and iterative), topological sort and union-find, as Swift templates.

  6. 06
    Recursion and Dynamic Programming

    Recursion and backtracking in Swift, memoization with dictionaries and arrays, bottom-up tables, and the common DP shapes with templates.