Loading...

The Word Inventory

A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
easy
Seniority
staff

Problem

Our search relevance scorer needs word frequency analysis with a singletons list. Write a function that takes a list of words and returns a dictionary with 'counts' (word → frequency mapping) and 'unique' (sorted list of words appearing exactly once).

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.