Apple Interview Questions
Practice the exact questions companies are asking right now.
Solve linked list, grid BFS, and median queries
You are given three separate algorithmic tasks. 1) Reorder a linked list by odd/even positions Given the head of a singly linked list, reorder the nod...
Design ad click aggregator and file sync service
You have two system design prompts. 1) Design an ads click aggregation system Design a service that ingests ad click events at very high QPS and suppo...
Explain Runnable vs Callable and thread-safe Singleton
Concurrency & Design Patterns (Java) 1. In Java concurrency, what is the difference between Runnable and Callable? - When would you choose one over...
Implement flood fill using BFS and DFS
Problem You are given a 2D grid image of size m × n, where each cell contains an integer color value. You are also given a starting cell (sr, sc) and ...
Describe common RTL lint warnings and errors
You are writing RTL (e.g., Verilog/SystemVerilog) and run a lint tool on your code. The tool reports items such as: - "Treat as black box" - Combinati...
Write a generator for substring pattern matches
Problem Write a generator that scans a string and emits a value whenever a substring matches a given pattern. Input - A string s - A string pattern (n...
Design a multimodal RAG assistant
Prompt Design a Retrieval-Augmented Generation (RAG) system that can answer user questions using an internal knowledge base containing multiple modali...
Implement TF-IDF scoring for documents
Problem Implement a simplified TF–IDF scorer. You are given: - A list of documents docs, where each document is a string. - A query string q. Tokeniza...
Solve three easy algorithm problems
You are given three independent algorithmic tasks. For each one, explain your approach (no need to run code). 1) Merge two sorted lists (integers inst...
Implement rotation, LRU cache, streaming median, cycle detection
Complete the following coding tasks. For each, provide code, justify time/space complexity, and describe edge cases: 1) Image rotation: Given an n×n i...
Improve chip performance without process advances
Assume you are working on a digital chip, but the semiconductor process node and basic device technology are fixed: there is no new, faster process an...
Solve interval, grid-fill, and heap tasks
You are asked to solve the following algorithmic problems. Problem 1: Concurrent users from online intervals You are given n inclusive time intervals ...
Implement most_frequent_key without using max()
Problem (Python OOP) You are given two classes. Parent precomputes frequency counts of items (as strings) from an input list. `python class Parent: ...
Implement bag-of-words similarity search from scratch
Implement a bag-of-words–based text similarity search engine from scratch. Write code that: ( 1) tokenizes text (lowercasing, punctuation handling, Un...
Explain annotation agreement and LLM vs human judges
Annotation Agreement Rate: Definition, Measurement, Limitations, and LLM-as-Judge Practices Context In labeling datasets and evaluating models, we oft...
Refactor rock–paper–scissors for config and ties
Refactor an existing Rock–Paper–Scissors tournament with three robot players so that the number of rounds is configurable and the system also tracks t...
Design video platform and catalog system
System Design: Two Independent Systems You are asked to design two large-scale systems. For each system, provide: - Scope and key requirements - Exter...
Explain your LLM project and contributions
Prior Experience Deep Dive (LLM) You mentioned you previously worked on an LLM-related research/project. Explain: - What problem you were trying to so...
Build leak-safe sklearn model with calibration
You must build an end‑to‑end scikit‑learn pipeline to predict churn_28d at decision time t0 using only features available at or before t0 (no leakage)...
Implement deep clone for complex objects
Implement a deep-clone function for nested objects in JavaScript (or a language of your choice) without using JSON serialization or third-party librar...