Sponsored
Use these hints if you're stuck. Try solving on your own first.
Try simulating the process of marking the elements and their adjacent.
If there is an element that was already marked, then you skip it.
Solve with full IDE support and test cases