Calculators and Parsing
Calculator problems come up often at Splunk. A hiring manager has opened a phone screen with one, a staff round has started with one, and an online assessment has added a twist to the string. It fits the product, since SPL's eval command does arithmetic over event fields.
The way to handle all of them is to build one loop and keep it. Read numbers a digit at a time and skip spaces. Keep a running total plus one open term. Times and divide fold into the term right away, plus or minus closes it out, and division truncates toward zero.
Each later version changes one rule, and a good loop absorbs it with a small change. Writing a fresh parser for each version takes time the round doesn't give you.
SplunkPremium lesson · Coding round
The 4 Splunk problems are below.
- A Premium questionCoding · Medium · Signature problem
- A Premium questionCoding · Hard · Signature problem
- A Premium questionCoding · Medium
+ 1 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.
Splunk interview guideKnow what Splunk asks before you walk in.
30 coding · 1 system design · 15 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.