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
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess 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
Build my plan
Evaluate Feature Compatibility Across Versions
00:00
5 left

Evaluate Feature Compatibility Across Versions

MediumPython

Problem

Given a list of dependency versions (for example: [103.003.02, 103.003.03, 203.003.02]), write a program to evaluate feature compatibility/support across these versions.

Asked in the Technical Screening stage. 75-minute coding round conducted on an online editor platform with runnable test cases.

Implement evaluate_compatibility(versions, requirements).

  • versions is a list of version strings.
  • requirements is a list of feature rules, each with feature, min_version, and optional max_version.
  • Return a list where each element is the sorted list of features supported by the corresponding version.

Version strings may contain leading zeros and 2 to 4 dot-separated numeric parts. Compare versions numerically, padding missing parts with zeros.

Constraints

  • 1 <= len(versions) <= 200
  • 1 <= len(requirements) <= 200
  • Each version has 2 to 4 numeric parts separated by dots
  • Each version part is in the range 0 to 999
  • Feature names are unique
  • If present, max_version is greater than or equal to min_version

Function Signature

def evaluate_compatibility(versions, requirements):
Interviewer

Your question is Evaluate Feature Compatibility Across Versions. 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.
CodePython 3
Sign up free to run your codeLog inLn 2
Run your code to see test output here.