Loading...

The Dynamic Container

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

Domain
Python
Difficulty
hard
Seniority
mid, senior

Problem

Implement an ArrayList class that behaves like a dynamic array. It should support append(val) to add an element, get(index) to retrieve an element, size() to return the current count, and remove(index) to delete an element by position. Internally, double the capacity when the array is full.

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.