InterviewStack.io LogoInterviewStack.io

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
Implement reservoir sampling in Python to uniformly sample n items from a stream of unknown length. Explain why simple random selection from a fixed-size buffer is biased and provide the proof sketch or intuition for reservoir sampling correctness.
HardTechnical
0 practiced
You are asked to refactor a 400-line data ingestion script into modular, testable components. Describe how you would break the script into functions and classes, what interfaces you would define, how to manage configuration, and how you would migrate to CI with unit tests without breaking downstream consumers.
EasyTechnical
0 practiced
Explain the role of unit tests in maintaining code quality for data processing functions. Provide three example test cases you would write for a function that normalizes numeric features to zero mean and unit variance, including edge cases and handling of missing or constant columns.
MediumTechnical
0 practiced
Explain the difference between shallow copy and deep copy in Python and give a practical data science example where shallow copying a dataset leads to an unintended side effect during in-place normalization of features.
HardTechnical
0 practiced
Implement a stable in-place partition function in C++ that partitions an array around a pivot value preserving relative order of equal elements. Explain challenges with in-place stability and provide complexity analysis. Discuss use cases in data pipelines where stable partitioning matters.

Unlock Full Question Bank

Get access to hundreds of Programming Fundamentals and Code Quality interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.