Premium problem108. Delete Rows and Columns

Easy Locked

Given 2-D array X, a list of row indices rows and column indices cols, return X with those rows AND columns removed.

Input

X =
[[ 0  1  2  3  4]
 [ 5  6  7  8  9]
 [10 11 12 13 14]
 [15 16 17 18 19]]
rows = [0, 2]
cols = [1, 3]

Output

[[ 5  7  9]
 [15 17 19]]

Premium problem

This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.

Implement solve(...)