Frage im Vorstellungsgespräch bei Globant

How to implement 2D matrix with code and How the code can be optimized?