PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Adyen

Implement LRU and target-sum combinations

Last updated: Mar 29, 2026

Quick Overview

This question evaluates implementation and algorithmic skills by combining a practical data-structure design task (implementing an in-memory LRU cache) with a combinatorial algorithms problem (finding target-sum combinations), measuring understanding of correctness, complexity analysis, and trade-off reasoning.

  • Medium
  • Adyen
  • Coding & Algorithms
  • Software Engineer

Implement LRU and target-sum combinations

Company: Adyen

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

Design and implement the following: 1) An in-memory cache with Least Recently Used (LRU) eviction supporting get(key) and put(key, value) in O( 1). If implementing from scratch, describe the hash map + doubly linked list approach, including how sentinel dummy head/tail nodes simplify edge cases, and why Java's LinkedList is not appropriate. Compare this to using LinkedHashMap and explain trade-offs. Analyze time and space complexity. 2) Given a list of candidate transfer amounts and a target amount, return all unique combinations of candidates that sum to the target (each candidate may be used unlimited times). Explain your backtracking approach, pruning rules to reduce the search space, how you avoid duplicate combinations, and the time/space complexity. Justify why backtracking is appropriate here and briefly compare with dynamic programming.

Quick Answer: This question evaluates implementation and algorithmic skills by combining a practical data-structure design task (implementing an in-memory LRU cache) with a combinatorial algorithms problem (finding target-sum combinations), measuring understanding of correctness, complexity analysis, and trade-off reasoning.

Adyen logo
Adyen
Jul 26, 2025, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
14
0

Design and implement the following:

  1. An in-memory cache with Least Recently Used (LRU) eviction supporting get(key) and put(key, value) in O( 1). If implementing from scratch, describe the hash map + doubly linked list approach, including how sentinel dummy head/tail nodes simplify edge cases, and why Java's LinkedList is not appropriate. Compare this to using LinkedHashMap and explain trade-offs. Analyze time and space complexity.
  2. Given a list of candidate transfer amounts and a target amount, return all unique combinations of candidates that sum to the target (each candidate may be used unlimited times). Explain your backtracking approach, pruning rules to reduce the search space, how you avoid duplicate combinations, and the time/space complexity. Justify why backtracking is appropriate here and briefly compare with dynamic programming.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Adyen•More Software Engineer•Adyen Software Engineer•Adyen Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.