I have a 2d array that looks like this:
XX
xx
What's the most efficient way to add an extra row and column:
xxy
xxy
yyy
For bonus points, I'd like to also be able to knock out single rows and columns, so for example in the matrix below I'd like to be able to knock out all of the a's leaving only the x's - specifically I'm trying to delete the nth row and the nth column at the same time - and I want to be able to do this as qickly as possible:
xxaxx
xxaxx
aaaaa
xxaxx
xxaxx