PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Verkada

Implement a recency cache and min-coins DP

Last updated: Apr 22, 2026

Quick Overview

This question evaluates data structure design and algorithmic problem-solving skills, focusing on an LRU-style recency cache and a dynamic programming minimum-coin change problem, and tests knowledge of efficient state management and optimization under constraints.

  • medium
  • Verkada
  • Coding & Algorithms
  • Frontend Engineer

Implement a recency cache and min-coins DP

Company: Verkada

Role: Frontend Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

The algorithm round covered two coding problems: 1. Design a fixed-capacity in-memory key-value cache that evicts the least recently accessed item when full. Implement: - `Cache(int capacity)` - `int get(int key)` which returns `-1` if the key does not exist - `void put(int key, int value)` Both operations should run in O(1) average time. 2. Given a list of positive coin denominations and a target amount, return the minimum number of coins needed to form exactly that amount. If the amount cannot be formed, return `-1`. You may use each denomination any number of times.

Quick Answer: This question evaluates data structure design and algorithmic problem-solving skills, focusing on an LRU-style recency cache and a dynamic programming minimum-coin change problem, and tests knowledge of efficient state management and optimization under constraints.

Related Interview Questions

  • Merge Sorted Arrays In Place - Verkada (medium)
  • Find and Merge Camera Alert Intervals - Verkada (hard)
  • Find user who can access every camera - Verkada (medium)
  • Implement LRU and LFU caches - Verkada (medium)
  • Validate a 9×9 grid under constraints - Verkada (medium)
Verkada logo
Verkada
Jan 10, 2026, 12:00 AM
Frontend Engineer
Onsite
Coding & Algorithms
3
0
Loading...

The algorithm round covered two coding problems:

  1. Design a fixed-capacity in-memory key-value cache that evicts the least recently accessed item when full. Implement:
    • Cache(int capacity)
    • int get(int key) which returns -1 if the key does not exist
    • void put(int key, int value) Both operations should run in O(1) average time.
  2. Given a list of positive coin denominations and a target amount, return the minimum number of coins needed to form exactly that amount. If the amount cannot be formed, return -1 . You may use each denomination any number of times.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Verkada•More Frontend Engineer•Verkada Frontend Engineer•Verkada Coding & Algorithms•Frontend 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.