All company sheets
Elastic logo

Elastic DSA interview questions

58 problems to practise before your Elastic online test or coding round. Most widely asked first.

58
Questions
18
Easy
28
Medium
12
Hard

Commonly reported. Problems candidates often report from this company’s coding rounds. These are Astra’s own tags, not an official question list.

Elastic is hiring · 6 open roles on Astra right nowView roles

58 questions

  1. 1

    Reverse a String Using Recursion

    EasyRecursionTagged at 7 companies
  2. 2

    Reverse a Linked List Recursively

    EasyRecursionTagged at 7 companies
  3. 3

    Find Number of Ways to Climb Stairs

    EasyRecursionTagged at 7 companies
  4. 4

    Compute and Return the Square Root of x

    EasyBinary SearchTagged at 7 companies
  5. 5

    Implement Standard Binary Search Recursively

    EasyBinary SearchTagged at 7 companies
  6. 6

    Find the First Bad Version in Product Releases

    EasyBinary SearchTagged at 7 companies
  7. 7

    Check If a Number Is Majority Element in Sorted Array

    EasyBinary SearchTagged at 7 companies
  8. 8

    Find the Distance Value Between Two Arrays

    EasyBinary SearchTagged at 7 companies
  9. 9

    Find Maximum Profit from Buying and Selling Stock

    EasyArrayTagged at 7 companies
  10. 10

    Find the Missing Number in an Array from 1 to N

    EasyArrayTagged at 7 companies
  11. 11

    Fitness App Weekly Calorie Tracker

    EasySliding WindowTagged at 7 companies
  12. 12

    Signal Processing Amplitude Sorting

    EasyTwo PointersTagged at 7 companies
  13. 13

    Maximum Average Subarray I

    EasySliding WindowTagged at 7 companies
  14. 14

    Is Subsequence

    EasyTwo PointersTagged at 7 companies
  15. 15

    Intersection of Two Arrays

    EasyTwo PointersTagged at 7 companies
  16. 16

    Squares of a Sorted Array

    EasyTwo PointersTagged at 7 companies
  17. 17

    Search in Rotated Sorted Array

    MediumArrayTagged at 7 companies
  18. 18

    Find All Combinations that Sum to Target II (No Duplicates)

    MediumRecursionTagged at 7 companies
  19. 19

    Find Smallest Divisor Given a Threshold

    MediumBinary SearchTagged at 7 companies
  20. 20

    Find Successful Pairs of Spells and Potions

    MediumBinary SearchTagged at 7 companies
  21. 21

    Count All Nodes in a Complete Binary Tree

    MediumBinary SearchTagged at 7 companies
  22. 22

    Determine if You Can Jump to the End of an Array

    MediumArrayTagged at 7 companies
  23. 23

    Max Consecutive Ones III

    MediumSliding WindowTagged at 7 companies
  24. 24

    Find the First Unique (Non-Repeating) Character in a String

    EasyStringTagged at 6 companies
  25. 25

    Find the Longest Common Prefix (Vertical Scanning)

    EasyStringTagged at 6 companies
  26. 26

    Longest Substring Without Repeating Characters

    MediumStringTagged at 6 companies
  27. 27

    Longest Palindromic Substring

    MediumStringTagged at 6 companies
  28. 28

    Binary Tree Level Order Traversal

    MediumTreeTagged at 6 companies
  29. 29

    House Robber

    MediumDynamic ProgrammingTagged at 6 companies
  30. 30

    Validate Binary Tree Nodes

    MediumTreeTagged at 6 companies
  31. 31

    Minimum Swaps To Make Sequences Increasing

    MediumDPTagged at 6 companies
  32. 32

    Largest Divisible Subset

    MediumDPTagged at 6 companies
  33. 33

    Simulate Asteroid Collisions in a One-Dimensional Row

    MediumStack and QueueTagged at 6 companies
  34. 34

    Validate Stack Sequences with Push and Pop Operations

    MediumStack and QueueTagged at 6 companies
  35. 35

    Design a Memory-Efficient Circular Queue

    MediumStack and QueueTagged at 6 companies
  36. 36

    Design a Stack with Increment Operation Support

    MediumStack and QueueTagged at 6 companies
  37. 37

    Find the Most Competitive Subsequence of Size K

    MediumStack and QueueTagged at 6 companies
  38. 38

    Find Shortest Distance from Gates to Rooms (Walls and Gates)

    MediumStack and QueueTagged at 6 companies
  39. 39

    Insert into a Sorted Circular Linked List

    MediumLinkedListTagged at 6 companies
  40. 40

    Implement a Binary Heap (Min-Heap) - ExtractMin

    MediumTreeTagged at 6 companies
  41. 41

    Check if a Binary Tree is a Complete Tree

    MediumTreeTagged at 6 companies
  42. 42

    Simplify a Unix-Style Absolute File System Path

    MediumStringTagged at 6 companies
  43. 43

    Implement a String Compression Function (e.g., 'aabcccccaaa')

    MediumStringTagged at 6 companies
  44. 44

    First Missing Positive

    HardArrayTagged at 6 companies
  45. 45

    Implement Wildcard Matching with '?' and '*'

    HardRecursionTagged at 6 companies
  46. 46

    Find Minimum in Rotated Sorted Array II (with Duplicates)

    HardBinary SearchTagged at 6 companies
  47. 47

    Maximize Profit in Job Scheduling

    HardBinary SearchTagged at 6 companies
  48. 48

    Video Game Terrain Water Physics

    HardTwo PointersTagged at 6 companies
  49. 49

    Find Eventual Safe States

    MediumGraphTagged at 5 companies
  50. 50

    Prim’s Algorithm (MST)

    MediumGraphTagged at 5 companies
  51. 51

    Chrome Browser History

    MediumDesignTagged at 5 companies
  52. 52

    Minimum Window Substring

    HardStringTagged at 5 companies
  53. 53

    Text Justification

    HardStringTagged at 5 companies
  54. 54

    Find the Maximum Value in Each Sliding Window

    HardStack and QueueTagged at 5 companies
  55. 55

    Find the Length of the Longest Valid Parentheses

    HardStack and QueueTagged at 5 companies
  56. 56

    Shortest Subarray with Sum at Least K

    HardStack and QueueTagged at 5 companies
  57. 57

    Articulation Points (Tarjan’s Algorithm)

    HardGraphTagged at 3 companies
  58. 58

    Discord Active User Cache

    HardDesignTagged at 3 companies

More company sheets