Programming Fundamentals and Code Quality Questions
Encompasses core programming skills, data structures, basic algorithms, language fundamentals, and code quality practices. Expect proficiency with arrays, strings, lists, hash maps or dictionaries, sets, common collection operations, basic sorting and searching algorithms, and tradeoffs between data structures. Understand control flow, functions and modular design, classes and object oriented programming concepts including encapsulation, inheritance, and polymorphism, exception handling, file input and output, and common language idioms for mainstream interview languages such as Python, Java, and C plus plus. Emphasizes writing clean, readable, maintainable code: meaningful naming, modular functions, small interfaces, handling edge cases and errors, logging and documentation, simple testing and debugging strategies, and awareness of time and space complexity for common operations. Candidates should be able to implement correct solutions, follow language specific idioms where appropriate, and demonstrate attention to code quality and readability.
MediumTechnical
0 practiced
Write a Python context manager `Timer(name: str, logger: Optional[logging.Logger]=None)` that measures and logs elapsed wall-clock time for a code block. Implement `__enter__` and `__exit__`, ensure exceptions propagate (do not suppress), and support optional logger and human-readable formatting.
MediumTechnical
0 practiced
Implement a Python decorator `retry(times: int, backoff: float)` that retries a wrapped function up to `times` times with exponential backoff (sleep `backoff ** attempt`). The decorator should log attempts and re-raise the last exception if all retries fail. Preserve function metadata.
HardSystem Design
0 practiced
Design a clean, maintainable codebase layout for an ML model serving microservice that supports model versioning, A/B/canary deployments, rollback, dependency isolation, and logging. Describe directory structure, module boundaries (API, model loading, preprocessing, feature client, utils), packaging, and CI checks to enforce code quality before deployment.
EasyTechnical
0 practiced
Compare Python `list`, `tuple`, `set`, and `dict`: describe mutability, order guarantees, typical time complexity for lookup/insert/delete, and practical use-cases in ML pipelines (e.g., batching, caching, label sets). Highlight memory and performance trade-offs.
MediumTechnical
0 practiced
Given a long, single-purpose Python function that mixes data loading, preprocessing, augmentation, and training steps, explain how you'd refactor it into modular, testable components. Give concrete suggestions for function/class boundaries, interfaces, dependency injection, and where to add unit and integration tests.
Unlock Full Question Bank
Get access to hundreds of Programming Fundamentals and Code Quality interview questions and detailed answers.