← IBM Interview Insights

IBM·Software Engineer·Online Assessment (OA)·Junior

JuniorPending
Jul 2026Remote

Summary

Took the IBM entry-level SWE online assessment and it was two very different problems back to back. The first was a graph/dependency thing, manageable once you see the structure. The second dropped you into a real codebase with failing tests and told you to figure it out, which was a completely different experience and nearly ran out the clock.

Questions Asked (2)

Q1

Solve a graph or dependency-based algorithmic problem.

Algorithms & Data Structures
Author's notes

Not too bad once I stopped overthinking the setup and just mapped out the relationships.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the problem constraints and graph representation first, then identify the appropriate algorithm (e.g., topological sort for dependencies, BFS/DFS for traversal, or union-find for connectivity). Walk through a small example to validate your approach, then discuss complexity and edge cases before coding.

Pro tip: Explicitly state assumptions about input size, graph directionality, and whether cycles are possible—interviewers at IBM value candidates who surface ambiguities early and design robust solutions rather than jumping straight to code.

1. Clarify requirements and constraints

Ask about graph size, directed vs. undirected edges, possibility of cycles, and expected output format. Confirm whether the problem is about ordering, connectivity, shortest path, or cycle detection.

2. Choose the right algorithm and data structures

Map the problem to a known pattern: topological sort (Kahn's or DFS) for dependencies, BFS for shortest path in unweighted graphs, DFS for cycle detection, or union-find for dynamic connectivity. Justify your choice based on constraints.

3. Walk through a small example

Trace your algorithm on a simple graph (including edge cases like a cycle or disconnected components) to verify correctness and catch off-by-one errors before coding.

4. Implement cleanly and analyze complexity

Write modular code with clear variable names, then state time and space complexity (e.g., O(V+E) for traversal). Mention trade-offs if multiple approaches exist.

5. Test edge cases and discuss extensions

Cover empty graph, single node, self-loops, disconnected components, and large inputs. Briefly mention how the solution scales or could be optimized.

Key Points to Mention

  • Graph representation choice (adjacency list vs. matrix) and its impact on complexity
  • Topological sorting using Kahn's algorithm (in-degree tracking) or DFS with recursion stack
  • Cycle detection and how to handle cyclic dependencies gracefully
  • Time and space complexity analysis (O(V+E) for most graph traversals)
  • Handling disconnected components and edge cases like empty input or self-loops
  • Trade-offs between BFS, DFS, and union-find for different dependency scenarios

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Given an existing backend repository and a technical spec, debug failing tests covering API filtering, pagination, and Redis caching including cache invalidation edge cases.

API & IntegrationsRoot Cause AnalysisSystem Design
Author's notes

This one nearly broke me.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the failing tests and the spec to understand expected behavior, then systematically isolate each failure (filtering, pagination, caching) using logs and test output. For each, trace the code path, reproduce the issue in isolation, and verify fixes against the spec and edge cases, especially cache invalidation scenarios.

Pro tip: Demonstrate a methodical debugging process: always reproduce the failure first, then form a hypothesis and test it with minimal changes. Mention writing additional tests for edge cases like cache stampede or stale data after invalidation to show proactive quality focus.

1. Understand the spec and failing tests

Review the technical spec to confirm expected API behavior for filtering, pagination, and caching. Run the failing tests to capture exact error messages and identify which assertions fail.

2. Isolate and reproduce each failure

For each failing test, isolate the scenario by mocking dependencies or using focused test runs. Reproduce the failure locally to confirm it's deterministic and gather logs/stack traces.

3. Trace code paths and form hypotheses

Follow the request flow from API endpoint through filtering/pagination logic to Redis cache interactions. Form hypotheses about root causes, such as incorrect query parameters, off-by-one pagination, or stale cache keys.

4. Fix and verify with edge cases

Implement targeted fixes and rerun tests. Add or adjust tests for edge cases like cache invalidation on updates, TTL expiry, and concurrent requests to ensure robustness.

5. Validate against spec and prevent regressions

Confirm all tests pass and behavior matches the spec. Consider adding integration tests or monitoring to catch similar issues in the future.

Key Points to Mention

  • Root cause analysis: using logs, stack traces, and binary search to isolate failures
  • API filtering: validating query parameter parsing and database query construction
  • Pagination: checking limit/offset calculations, boundary conditions, and total count accuracy
  • Redis caching: cache key design, TTL, and invalidation strategies (e.g., write-through, delete-on-update)
  • Cache invalidation edge cases: race conditions, stale data after updates, and cache stampede
  • Testing: writing focused unit/integration tests and using mocks for Redis to simulate failures

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.