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.

EasyTechnical
24 practiced
Given two sorted integer arrays A and B of sizes m and n, write a Java function mergeSorted(int[] A, int[] B) that returns a new sorted array containing all elements from A and B in O(m + n) time. Describe edge cases, memory usage, and how you would modify this if A has extra trailing capacity to do an in-place merge.
HardTechnical
32 practiced
You must build a streaming job with exactly-once processing semantics for events that may be retried or replayed. Describe an end-to-end design including deduplication strategies, idempotent sinks or transactional writes, checkpointing, and how stream frameworks like Flink or Kafka Streams achieve exactly-once. Discuss performance trade-offs.
MediumTechnical
43 practiced
Implement a Java producer-consumer system using BlockingQueue where producers read lines from multiple files and consumers process and write to a sink. Design a clean shutdown mechanism so producers and consumers exit gracefully after all input is processed, and describe how to handle interruptions and propagate errors.
MediumTechnical
29 practiced
You have a 200GB newline-delimited JSON file containing user records with fields user_id and updated_at. Design an implementation to deduplicate the file so only the most recent record per user_id remains, given 4GB RAM. Outline algorithm, disk usage, how to split work, and trade-offs between external sort and hash-based partitioning.
HardTechnical
43 practiced
Implement a Bloom filter in Java that supports add(byte[] item), mightContain(byte[] item), and merge(BloomFilter other). The implementation should accept expectedInsertions and falsePositiveProbability on construction and expose memory usage. Explain choice of hash functions and how to compute optimal bit array size and number of hash functions.

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.