Elastic Coding Interview Questions
25 Elastic coding interview problems with full optimal solutions — 8 easy, 12 medium, 5 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Elastic interviewer values, and a FAQ section.
Showing 3 problems of 25
- #4hardsometimes asked
4. Median of Two Sorted Arrays
Find the median of two sorted arrays in O(log(m+n)) time. Elastic includes this hard problem because computing global percentiles across distributed shards — a core Elasticsearch aggregation feature — requires exactly this kind of partitioned-binary-search reasoning over sorted shard segments.
- #23hardvery frequently asked
23. Merge K Sorted Lists
Merge K sorted linked lists into one sorted list. This is one of the most Elastic-relevant hard problems in existence — merging sorted posting lists from K shards is the exact operation Elasticsearch performs on every multi-shard search query, and the min-heap approach maps one-to-one to the coordinating node's result collection logic.
- #127hardsometimes asked
127. Word Ladder
Find the shortest transformation sequence from one word to another, changing one letter at a time. Elastic uses this BFS-on-a-word-graph problem because edit-distance graph traversal and fuzzy query shortest paths underpin Elasticsearch's fuzziness and Levenshtein automaton query routing.