Object-Oriented Programming · Airbnb · Medium
This problem is a variation on a standard 2D vector iterator question; if you haven't solved that one yet, it may be helpful to complete it first. Design an iterator that flattens a 2D vector into a single row-by-row sequence of integers. Beyond ordinary iteration, the iterator must support removing the most recently returned element and must expose a snapshot of the current 2D vector state after any removals. Implement the Vector2D class: Vector2D(List > vec2d) Initializes…
Checking your access…