Software Engineer (SDE) Roadmap, Diagnostics & DSA / Python / FastAPI Guides
Master Data Structures & Algorithms, Python fundamentals & concurrency, and production FastAPI backend engineering with SOARDO's 82-skill prerequisite roadmap and adaptive diagnostic.
Diagnostic format
8 multiple-choice + 4 written engineering scenarios covering arrays, graphs, dynamic programming, Python, SQL joins, and caching.
Prerequisite roadmap phases
All 82 Skills & Study Guides in Software Engineer
Array Basics: Traversal, Insertion & Deletion
Arrays store elements in contiguous memory slots, giving O(1) random access by index (base_address + index * elemen…
Basic Bit Operations & Tricks
Bitwise operators manipulate individual binary bits directly in O(1) CPU instructions: AND (&) masks bits (1 only i…
1D DP: Fibonacci, Climbing Stairs & House Robber
Dynamic Programming solves problems with **overlapping subproblems** and **optimal substructure** by storing subpro…
Graph Representation: Adjacency List & Matrix
Graphs connect vertices `V` via edges `E` (directed/undirected, weighted/unweighted). An **Adjacency List** (`adj[u…
Greedy Fundamentals: Activity Selection & Intervals
Greedy algorithms make the locally optimal choice at each step (typically after sorting by end time, deadline, or r…
Hash Maps & Hash Sets
A hash map converts keys to array bucket indices via a hash function, supporting O(1) average insert, lookup, and d…
Singly Linked List: Insert, Delete & Reverse
A singly linked list links nodes via next pointers instead of contiguous memory. Access to the k-th node is O(k), w…
Recursion Fundamentals
Recursion solves a problem by reducing it to smaller self-similar subproblems until hitting a base case that return…
Binary Search & Variants
Binary search finds a target or boundary in a monotonic/sorted search space in O(log n) time and O(1) iterative spa…
Stack: Implementation & Applications
A stack follows Last-In-First-Out (LIFO): push, pop, and peek all run in O(1). Stacks naturally model nested struct…
Binary Trees: Traversals & Properties
Every node in a binary tree has at most two children (`left`, `right`), making recursive divide-and-conquer natural…
Two Pointers
The two-pointers technique replaces nested O(n^2) loops with a single O(n) scan in O(1) extra space using two indic…
Advanced XOR Tricks & Bitmask DP
Advanced bit manipulation pairs XOR properties (`x ^ x = 0`) with bitmask DP (`mask` from `0` to `(1 << n) - 1`) to…
2D DP: Grid Problems & Edit Distance
2D Dynamic Programming models grid coordinates `(r, c)` or string prefix alignments `(i, j)`. For Edit Distance (`L…
BFS & DFS on Graphs
Graphs can contain CYCLES and disconnected components, so both BFS and DFS require a `visited` set and an outer `fo…
Advanced Greedy: Huffman Coding & Job Scheduling
Advanced greedy problems use a **priority queue (`min-heap` / `max-heap`)** when choices dynamically create new sub…
Collision Resolution Strategies
Hash collisions occur when two distinct keys map to the same bucket index (`hash(k1) % capacity == hash(k2) % capac…
Doubly Linked List
A doubly linked list stores `prev` and `next` pointers on every node. Given a direct reference to node `X`, you can…
Backtracking: Subsets, Permutations & N-Queens
Backtracking explores a decision tree recursively via **Choose -> Explore -> Unchoose (`pop` / undo mutation)**, pr…
Merge Sort, Quick Sort & Heap Sort
Understanding O(n log n) comparison sorts guides engineering trade-offs: **Merge Sort** guarantees worst-case `O(n …
Queue & Deque
A Queue is FIFO (First-In, First-Out): `enqueue` adds to the back and `dequeue` removes from the front, preserving …
Binary Search Trees
A Binary Search Tree enforces a **global subtree invariant**: EVERY value in `node.left` is strictly `< node.val`, …
Sliding Window
Sliding window maintains a contiguous range `[left..right]` dynamically, reusing prior window state in O(n) total t…
Knapsack Variants
0/1 Knapsack chooses at most ONE copy of each item `(w, v)` up to capacity `W` (`dp[i][c] = max(dp[i-1][c], v + dp[…
Topological Sort
Topological Sort orders every vertex of a Directed Acyclic Graph (DAG) so for every prerequisite edge `u -> v`, `u`…
Fast & Slow Pointers / Cycle Detection
Floyd’s tortoise-and-hare moves `slow` by 1 step and `fast` by 2 steps each iteration, achieving O(n) time and O(1)…
Monotonic Stack / Queue
A Monotonic Stack stores **indices** maintaining strictly increasing or decreasing values from bottom to top, solvi…
BFS & DFS on Trees
BFS (Breadth-First Search) uses a FIFO `deque` to process the tree level-by-level (`for _ in range(len(q)):` snapsh…
Prefix Sum & Difference Arrays
A prefix sum array `pref` precomputes cumulative sums (`pref[0] = 0`, `pref[i+1] = pref[i] + nums[i]`) in O(n) setu…
LCS, LIS & Subsequence Problems
Longest Common Subsequence (LCS) compares prefixes of two strings: `if a[i-1] == b[j-1]: 1 + dp[i-1][j-1]`, else `m…
Shortest Path: Dijkstra & Bellman-Ford
Dijkstra’s algorithm finds single-source shortest paths on **non-negative weighted** graphs in `O((V + E) log V)` u…
Heap / Priority Queue
A binary heap (priority queue) maintains only a partial parent-<=children invariant inside a flat array (`left = 2i…
Tries / Prefix Trees
A Trie (Prefix Tree) stores strings character-by-character along shared prefix paths (`root -> "c" -> "a" -> "t"`),…
String Manipulation & Pattern Matching
In Python/JS/Java, strings are IMMUTABLE—concatenating character-by-character inside a loop (`s += ch`) copies the …
Union-Find / Disjoint Sets
Union-Find (Disjoint Set Union) tracks connected components cleanly under dynamic edge additions using `find(x)` an…
Minimum Spanning Tree: Kruskal & Prim
A Minimum Spanning Tree (MST) connects all `V` vertices of a connected undirected weighted graph using exactly `V -…
OAuth2 Password Flow & JWT Tokens
OAuth2 Bearer JWT auth extracts tokens cleanly via `OAuth2PasswordBearer` / `HTTPBearer` and MUST cryptographically…
Project Setup & Running with Uvicorn
A FastAPI service instantiates `app = FastAPI(title=...)`, mounts route decorators cleanly (`@app.get("/health")`),…
BackgroundTasks for Post-Response Work
FastAPI `BackgroundTasks` runs lightweight in-process post-response jobs (`background_tasks.add_task(send_welcome_e…
SQLAlchemy ORM with FastAPI
SQLAlchemy 2.0 separates `select(Model).where(...)` queries, explicit transaction commits (`db.commit()` / `with db…
Depends() & Function Dependencies
FastAPI `Depends()` builds clean composable dependency trees for auth (`get_current_user`), pagination (`Pagination…
HTTPException & Custom Exception Handlers
Raise `HTTPException(status_code=404, detail="Mission not found")` for expected client/resource errors (`400/401/40…
CORS Middleware Configuration
Browsers block cross-origin JavaScript requests unless the backend explicitly responds to `OPTIONS` preflight + act…
TestClient & pytest Setup
`fastapi.testclient.TestClient(app)` runs your full FastAPI app in-process (zero network port wait!) backed by `htt…
Password Hashing & Token Verification
Never store plaintext or fast SHA-256 passwords—use salted adaptive hashing (`Argon2id` or `bcrypt` via `pwdlib`/`p…
Path Operations: GET, POST, PUT, DELETE
FastAPI evaluates routes **in registration order**! Place static paths (`/users/me`) **BEFORE** parameterized paths…
Async Route Handlers & Event Loops
FastAPI handles **`def`** vs **`async def`** endpoints differently under the hood! Plain **`def`** routes run autom…
Async Database with asyncpg & SQLAlchemy Async
High-concurrency FastAPI `async def` routes pair `create_async_engine("postgresql+asyncpg://...")` and `AsyncSessio…
DB Session Dependency Pattern
Database sessions MUST use a **`yield` dependency**: `session = SessionLocal(); try: yield session; finally: sessio…
Validation Error Customization
When Pydantic fails request parsing, FastAPI raises `RequestValidationError` returning `422 Unprocessable Entity` w…
Custom Middleware for Logging & Timing
Custom HTTP middleware (`@app.middleware("http")` or pure ASGI middleware) wraps every request/response for timing …
AsyncClient with httpx for Async Routes
When testing **`async def`** routes touching an `AsyncSession` / `asyncio` primitives directly (`@pytest.mark.async…
Path Params, Query Params, Headers & Cookies
FastAPI routes parameters cleanly by origin: path parameters appear inside `{...}` in the route template; scalar pa…
Request Body with Pydantic Models
Pydantic `BaseModel` parameters automatically parse, type-validate, and coerce incoming JSON request bodies, return…
Response Models, Status Codes & JSONResponse
Setting `response_model=PublicUserOut` and `status_code=status.HTTP_201_CREATED` filters, validates, and documents …
asyncio Event Loop & async/await Basics
`async def` defines a coroutine object whose execution pauses at `await`, yielding control back to the single-threa…
Lists & Tuples: Operations & Slicing
Lists (`[...]`) are mutable dynamic arrays supporting O(1) append/pop-end and O(k) slicing (`items[start:stop]`, wh…
try/except/finally & Raising Exceptions
Use `try / except SpecificError / else / finally` to catch ONLY the failure modes you actually know how to handle, …
itertools Module
`itertools` provides C-speed lazy building blocks: `islice(iter, n)` slices streams/generators in O(1) space withou…
File Reading & Writing with Context Managers
Always open files using a `with open(path, mode, encoding="utf-8") as f:` context manager so the OS file descriptor…
Classes, Objects & __init__
Classes bundle data attributes and cohesive behavior via `__init__(self, ...)` and instance methods receiving `self…
Variables, Data Types & Type Casting
Form inputs and CSV/JSON strings arrive as text (`str`), where `"12" + "3"` concatenates to `"123"` instead of addi…
pytest: Fixtures, Parametrize & Assertions
Pytest tests use plain `assert` statements, `@pytest.mark.parametrize` to cover normal + boundary + invalid inputs …
Type Annotations: Optional, Union, List & Dict
Type hints (`str | None`, `list[int]`, `dict[str, float]`, `TypedDict`, `Protocol`) document function contracts exp…
asyncio.gather, Tasks & Concurrency Patterns
`await task1(); await task2()` sequentially waits for `task1` before starting `task2`! Wrap independent coroutines …
Dicts & Sets: Operations & Use-Cases
Dicts map hashable keys to values with O(1) average lookup/insert (`counts[k] = counts.get(k, 0) + 1`). Sets store …
Custom Exception Classes
Custom exceptions subclass `Exception` (NEVER `BaseException`, which catches `SystemExit`/`KeyboardInterrupt`) and …
functools Module: partial, lru_cache & reduce
`functools` supplies higher-order helpers cleanly: `@lru_cache(maxsize=...)` (or `@cache`) memoizes pure functions …
os & pathlib Modules
Use `pathlib.Path` over fragile string concatenation (`folder + "/" + file`): `/` operator (`Path("data") / "2026" …
Inheritance, MRO & super()
Use Inheritance (`is-a`) strictly when subclasses share and honor the parent’s behavioral contract (Liskov Substitu…
Conditionals, Loops & List Comprehensions
A loop visits each element in sequence and an `if` guard filters or branches based on exact conditions—choose `<` v…
unittest.mock & pytest-mock
Mocking isolates unit tests from slow/flaky external boundaries (HTTP APIs, clocks, emails) cleanly using `unittest…
Pydantic Models for Data Validation
Pydantic `BaseModel` turns type annotations into strict **runtime boundary parsing & validation** (powering FastAPI…
collections Module: deque, Counter, defaultdict
Python `collections` provides specialized containers tuned for common algorithmic patterns: `deque` gives O(1) `app…
Generators & Yield
Generators (`yield` or `(x for x in seq)`) compute values **lazily one item at a time** in **O(1) memory** instead …
JSON & CSV Parsing
`json.loads` / `json.dumps` parse/serialize JSON strings cleanly (`load`/`dump` work on file streams), rejecting co…
Magic/Dunder Methods (__str__, __len__, __eq__)
Magic (dunder) methods hook custom classes cleanly into Python’s built-in syntax: `__repr__` gives developers an un…
Functions, Arguments, Lambda & Scope
Functions encapsulate reusable logic with explicit parameters, pure return values, and predictable scope (LEGB rule…
heapq Module for Priority Queues
Python’s standard `heapq` operates directly on a regular Python `list` as an in-place binary MIN-heap: `heappush(h,…
Decorators & @property
A decorator wraps a function/method cleanly (`fn = log_calls(fn)`) to add cross-cutting behavior (timing, auth guar…
Built-in Functions & Standard Operators
Python built-in functions (`len`, `sum`, `min`, `max`, `sorted`, `enumerate`, `zip`, `any`, `all`) replace brittle …
Dataclasses & NamedTuples
`@dataclass` auto-generates clean `__init__`, readable `__repr__`, and field-wise `__eq__` for data-holding classes…
Frequently asked questions
How many skills are in the SOARDO Software Engineer (SDE) track?
The Software Engineer track includes 82 curated leaf skills spanning DSA, Python, and FastAPI—each with worked examples, common pitfalls, and practice questions.
How does SOARDO sequence SDE topics?
SOARDO enforces a prerequisite knowledge graph so learners build core array, recursion, and syntax fluency before unlocking trees, graphs, dynamic programming, and async backend architecture.