谷歌电面

give a 2d matrix, write a iterator class.
what if the number of elements in each row is not equal.
what if the type is unknown.