PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Akuna Capital

Implement a ring buffer

Last updated: Mar 29, 2026

Quick Overview

This question evaluates implementation skills for fixed-capacity circular buffers and competency in array-based data structures, including O(1) push/pop/peek/isEmpty/isFull/size operations and logical-order iteration.

  • Medium
  • Akuna Capital
  • Coding & Algorithms
  • Software Engineer

Implement a ring buffer

Company: Akuna Capital

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

Implement a fixed-capacity circular buffer (ring buffer) supporting push, pop, peek, isEmpty, isFull, and size in O( 1) time using an array. Define and implement the behavior when pushing to a full buffer (either overwrite the oldest element or reject the push—choose and document). Provide iteration over current elements in logical order. Discuss how you would extend it to a thread-safe version with optional blocking push/pop using condition variables, and analyze time/space complexity.

Quick Answer: This question evaluates implementation skills for fixed-capacity circular buffers and competency in array-based data structures, including O(1) push/pop/peek/isEmpty/isFull/size operations and logical-order iteration.

Related Interview Questions

  • Find minimum swaps to sort array with duplicates - Akuna Capital (hard)
  • Heapify an array into a max-heap - Akuna Capital (Medium)
  • Compute max profit across dated stock quotes - Akuna Capital (Medium)
  • Break a palindrome to smallest non-palindrome - Akuna Capital (Medium)
  • Compute min operations to transform integers - Akuna Capital (Medium)
Akuna Capital logo
Akuna Capital
Sep 6, 2025, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
5
0

Implement a fixed-capacity circular buffer (ring buffer) supporting push, pop, peek, isEmpty, isFull, and size in O(

  1. time using an array. Define and implement the behavior when pushing to a full buffer (either overwrite the oldest element or reject the push—choose and document). Provide iteration over current elements in logical order. Discuss how you would extend it to a thread-safe version with optional blocking push/pop using condition variables, and analyze time/space complexity.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Akuna Capital•More Software Engineer•Akuna Capital Software Engineer•Akuna Capital Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ 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.