Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
ExperiencesCoaching
New
Practice
Mock InterviewsTimed interview simulations with feedbackSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Get started
Debugging Intermittent Embedded Issues
00:00
5 left

Debugging Intermittent Embedded Issues

MediumPython

Problem

Can you explain your approach to debugging intermittent issues in embedded systems?

Implement the trace-analysis portion of that approach. Given event identifiers from failing and passing runs, return events present in every failing run and absent from every passing run.

Function: diagnostic_events(failing_runs, passing_runs)

Return a lexicographically sorted list of unique event identifiers. Each run is a list of strings. Assume at least one failing run exists.

Constraints

  • 1 <= len(failing_runs) <= 10^4
  • 0 <= len(passing_runs) <= 10^4
  • Each run contains zero or more event identifiers
  • Each event identifier is a non-empty string
  • The first failing run contains at least one event identifier
  • Return every qualifying identifier exactly once, in lexicographic order

Function Signature

def diagnostic_events(failing_runs, passing_runs):
Interviewer

Your question is Debugging Intermittent Embedded Issues. Start with the requirements in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
Code
Sign up free to run your codeLog inLn 2
Run your code to see test output here.