JetBrains Coding Interview Questions
25 JetBrains coding interview problems with full optimal solutions — 9 easy, 12 medium, 4 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an JetBrains interviewer values, and a FAQ section.
Showing 4 problems of 25
- #21hardfoundational
21. Binary Tree Maximum Path Sum
Find the maximum path sum where a path is any node-to-node sequence — JetBrains uses this to test whether you can separate a recursive contribution from a global answer over an AST.
- #22hardfoundational
22. Find Median from Data Stream
Maintain a running median over a stream of integers — JetBrains uses this to test two-heap balance, the same trick behind their incremental indexer's latency percentile sampler.
- #23hardfoundational
23. Serialize and Deserialize Binary Tree
Encode a binary tree to a string and decode it back losslessly — JetBrains uses this to test tree-serialization design, mirroring how PSI stubs hit disk and rehydrate.
- #24hardfoundational
24. LFU Cache
Design an O(1) least-frequently-used cache — JetBrains uses this to test layered data-structure design, the kind powering their PSI stub and reference caches.