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.

HardSystem Design
0 practiced
Design and implement (high-level or pseudocode) a thread-safe LRU cache in Java that supports concurrent gets and puts. Explain the locking or non-blocking strategies you would use to maximize throughput (e.g., lock striping, ConcurrentHashMap with segmented recency lists, ReadWriteLock), and discuss trade-offs.
MediumTechnical
0 practiced
Write a Java function to detect whether a singly linked list has a cycle and, if so, return the node where the cycle begins. Use O(1) extra space and O(n) time (Floyd's cycle-finding algorithm). Provide clear null checks and edge-case handling.
HardTechnical
0 practiced
Explain copy constructors, copy assignment operator, move constructor, and move assignment operator in C++. Describe the Rule of Three/Five/Zero with code examples, common pitfalls like double-delete and shallow copy, and how to prefer modern C++ idioms to avoid manual resource management.
EasyTechnical
0 practiced
Describe how a hash table (hash map/dictionary) works internally. Explain common collision-resolution strategies (separate chaining, open addressing variants like linear/quadratic probing and double hashing), trade-offs, average and worst-case lookup complexity, and how resizing (rehashing) is typically implemented.
MediumTechnical
0 practiced
Explain what race conditions and deadlocks are in multithreaded programs. For each, give a concise pseudocode example that reproduces the problem and list practical strategies to prevent them (mutexes, atomic operations, lock ordering, timeouts, avoiding shared mutable state).

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.