DataDriven
LearnPracticeInterviewDiscussDailyJobs

The Bouncer

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

Domain
Python
Difficulty
easy
Seniority
L3

Problem

Implement a permission tracker. The function receives a list of operations, each a 2-element list [op, permission] where op is 'add', 'remove', or 'check'. For each 'check' operation, append True or False (whether the permission is currently granted). Add and remove operations produce no output. Return the list of check results in order.

Summary

Every door has a guest list.

Practice This Problem

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

Related

  • All Practice Problems
  • Mock Interview Mode
  • Python Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons