InterviewLegend

Recursion and DP

Alex Chen60 min readUpdated 49 real interview reports

Several Splunk rounds have included a dynamic programming problem, and they're usually the classic ones at a medium level. Each fills a table from small cases up, or puts a cache on a recursion. A senior round once asked for one at the hard end of this set.

Say the recurrence before you write any loop. One sentence should cover what a cell means and which smaller cells it reads. Once the sentence is right, the code is short.

Ask about reuse early, because whether a number can be picked twice changes the whole table, and it changes how a backtracking search avoids listing the same set twice.

The hardest one needs a cache keyed on a pair of indices, and the last one is plain recursion with no table at all.

SplunkPremium lesson · Coding round

The 5 Splunk problems are below.

  1. A Premium questionCoding · Medium
  2. A Premium questionCoding · Medium
  3. A Premium questionCoding · Medium

+ 2 more in this lesson

Each with hints, the follow-up and a tested solution.

Get the Splunk questions

$49 a year · all 100 companies · cancel anytime

From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.

Had your Splunk interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Splunk interview guide

Know what Splunk asks before you walk in.

30 coding · 1 system design · 15 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.