Just use the array initializer (repeating: , count: ) as follows:

var rows = 3 
var column = 5 
var arrayOfArrayInitialization = [[Int]](repeating: [Int](repeating: 0, count: column), count: rows)

That’s all my people, I hope you liked reading this article as much as I enjoyed writing it. If you want to support this blog you can Buy Me a Coffee or just leave a comment saying hello. You can also sponsor posts and I’m open to freelance writing! You can reach me on LinkedIn or Twitter and send me an e-mail through the contact page.

Thanks for the reading and… That’s all folks.


Learn More Algorithms

If you want to continue studying algorithms you can check the solution to find the symmetric difference. Also, the inventory update problem where we use a dictionary to resolve a really tricky question.


If you're a mid/senior iOS developer looking to improve your skills and salary level, join this 100% free online crash course. It's available only until April 28th, so click to get it now!

Image Credit: Wikiart