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
Python Strings, Lists, and Dicts
00:00
5 left

Python Strings, Lists, and Dicts

MediumSQL · PostgreSQL

Problem

How would you solve coding problems involving Python strings, lists, and dictionaries, and analyze their complexity?

Use the supplied coding-problem, topic, and submission records to identify candidates with accepted solutions covering all three topics. Include only accepted submissions linked to a known problem and topic.

Output

  1. One row per qualifying candidate with candidate_id, solved-problem counts by topic, total solved problems, complexity_profile, and latest_accepted_at.
  2. Include candidates covering all three topics, ordered by total solved problems descending, then candidate_id ascending.

Schema

coding_problems
ColumnTypeDescription
problem_idPKINTUnique coding problem identifier
titleVARCHAR(150)Coding problem title
difficultyVARCHAR(20)Problem difficulty level
time_complexityVARCHAR(30)Expected asymptotic time complexity
problem_topics
ColumnTypeDescription
problem_idPKINTReferenced coding problem
topicPKVARCHAR(30)Primary data-structure topic
submissions
ColumnTypeDescription
submission_idPKINTUnique submission identifier
candidate_idVARCHAR(30)Candidate identifier
problem_idINTSubmitted problem identifier
statusVARCHAR(20)Submission result
submitted_atTIMESTAMPSubmission timestamp
Tablescoding_problemsproblem_topicssubmissions
Interviewer

Whenever you're ready, walk me through your approach or go straight to the code. The requirements and the three tables are in the Question tab.

You need to log in / sign up to run or submit.
CodePostgreSQL
Sign up free to run your codeLog inLn 1
Run your query to see results here.