Confluent Coding & Algorithms Interview Questions
Master your tech interview with our curated database of real questions from top companies.
Rank songs by pairwise user preferences
You are given preference rankings for n users over m songs. Each song is labeled from 0 to m - 1. For each user i (0-indexed), you are given an array ...
Implement tail N lines
Implement a function tail(path: string, N: int) that prints the last N lines of a potentially multi-GB text file without loading the whole file into m...
Solve constrained monster traversal
You are given a directed graph with n rooms labeled 0..n-1; each room i contains a monster with health hp[i] ≥ 0. You start at room s with energy E. E...
Implement tail N lines
Implement a utility that prints the last N lines of input. Requirements: handle both a regular seekable file and a non-seekable stream (stdin/pipe); s...
Explain algorithm strategies and complexity
You are faced with a complex, potentially ambiguous coding problem. Describe how you would clarify requirements, identify constraints, propose multipl...