Query Order and Batch Lifetimes from Event Files

Last updated: August 30, 2026

Quick Overview

The question asks you to modify existing functions to support both open and closed orders based on their timestamps and IDs from event files.

Hudson
Software Engineering Fundamentals
Software Engineer
Hudson
August 30, 2026
Software Engineer
Technical Screen
Software Engineering Fundamentals
Medium

0

0

10 solved


The question asks you to modify existing functions to support both open and closed orders based on their timestamps and IDs from event files.

This question is typically asked during the technical screening round to assess a candidate's understanding of data structures and file handling in software engineering. The interviewer is evaluating your ability to manipulate data effectively, optimize existing functions, and ensure that your solution can handle various states of orders (open or closed).

What the Interviewer Expects
  • Clearly explain the current functionality of the existing functions.
  • Demonstrate an understanding of how to manage open and closed orders.
  • Provide a structured approach to modifying the functions.
  • Include considerations for edge cases and error handling.
  • Write clean, efficient, and maintainable code.
Key Topics to Cover
File I/O
Data Structures
Function Modification
Error Handling
Algorithm Optimization
How to Approach This
  1. Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
  2. Choose data structures based on access patterns, not familiarity.
  3. Prefer immutable data and message passing over shared mutable state for concurrency.
  4. Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
  • How would you handle errors when reading from the event files?
  • Can you explain how you would test your modified functions?
  • What considerations would you make for performance in a large dataset?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Current Functionality Overview

The existing functions handle events with timestamps, order IDs, and batch IDs. We have a findtimestamp function that retrieves a timestamp based on a given target ID. Additionally, there is a funct...

Modifying the Functions

To support both open and closed orders, I would modify the findtimestamp function to include a parameter that indicates whether to search for open orders, closed orders, or both. This could be imple...


Submit Your Answer
Markdown supported