← Adyen Interview Insights

Adyen·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Interviewed for a software engineering role at Adyen and got two fairly meaty technical problems back to back. One was a classic cache design question, the other a combinatorics/backtracking problem. Both had meaningful follow-ups that pushed past the obvious answers.

Questions Asked (2)

Q1

Design and implement an in-memory LRU cache that supports get and put operations in O(1) time.

Algorithms & Data StructuresSystem DesignTechnical Trade-offs
Author's notes

I knew the doubly linked list plus hash map combo going in, but fumbled a bit explaining why sentinel dummy nodes matter.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (capacity, eviction policy, thread-safety) and then propose a hash map combined with a doubly linked list to achieve O(1) get and put. Walk through the design, implement the core operations, and discuss trade-offs and edge cases.

Pro tip: Mention that you would use a doubly linked list with sentinel nodes to simplify edge cases, and discuss how you would make it thread-safe if needed (e.g., using a lock or ConcurrentHashMap with synchronized blocks).

1. Clarify requirements

Ask about capacity, eviction policy (LRU), thread-safety, and expected operations. Confirm that get and put must be O(1).

2. Choose data structures

Explain that a hash map provides O(1) access to nodes, and a doubly linked list maintains recency order. Together they enable O(1) get and put.

3. Design the algorithm

Describe how get moves the accessed node to the front (most recent), and put adds/updates the node at the front, evicting the least recent (tail) if capacity is exceeded.

4. Implement and handle edge cases

Write clean code with sentinel head/tail nodes to avoid null checks. Handle edge cases: capacity 0, updating existing key, and eviction.

5. Discuss trade-offs and extensions

Talk about time/space complexity, thread-safety options, and possible variations (e.g., LFU, TTL).

Key Points to Mention

  • Hash map for O(1) lookup and doubly linked list for O(1) insertion/deletion.
  • Sentinel nodes (dummy head and tail) to simplify boundary conditions.
  • Eviction of the least recently used item when capacity is exceeded.
  • Updating an existing key should also mark it as most recently used.
  • Thread-safety considerations: synchronization or concurrent data structures.
  • Time complexity: O(1) for both get and put; space complexity: O(capacity).

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

Q2

Given a list of candidate numbers and a target, find all unique combinations that sum to the target, where each candidate can be used any number of times.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Backtracking felt obvious to me but I got a little tangled up explaining the pruning.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the problem constraints (e.g., positive numbers, duplicates, target range) and then propose a backtracking solution that builds combinations incrementally, ensuring uniqueness by enforcing non-decreasing order. Discuss time/space complexity and potential optimizations like sorting and pruning.

Pro tip: Mention that sorting the candidates and using a start index to avoid duplicates is crucial, and that pruning when the remaining sum is less than the current candidate can significantly improve performance.

1. Clarify requirements and constraints

Ask about input size, whether numbers are positive, if duplicates exist, and if the output order matters. This shows attention to detail and helps tailor the solution.

2. Outline backtracking approach

Explain that you'll use recursion to explore combinations, starting from a given index, and allow reuse of the same element by not incrementing the index when recursing.

3. Handle uniqueness and pruning

Sort the input to skip duplicates and enforce non-decreasing order. Prune branches when the current sum exceeds the target or when adding the smallest remaining candidate still exceeds the target.

4. Analyze complexity and trade-offs

Discuss time complexity (exponential in worst case) and space complexity (recursion depth). Mention that sorting adds O(n log n) but enables pruning and deduplication.

5. Test with examples and edge cases

Walk through a small example (e.g., candidates [2,3,6,7], target 7) and consider edge cases like empty input, target 0, or no solution.

Key Points to Mention

  • Backtracking with recursion and a start index to avoid permutations.
  • Sorting the input to handle duplicates and enable pruning.
  • Allowing reuse of the same element by keeping the index unchanged in recursive calls.
  • Pruning when the current sum exceeds the target or when the smallest remaining candidate is too large.
  • Time complexity: O(N^(T/M)) where N is number of candidates, T is target, M is minimal candidate value.
  • Space complexity: O(T/M) for recursion depth.

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