var tri = [[Int]]();
tri[0][0] = 321;
This code causes this error:
fatal error: Index out of range
What's wrong?
var tri = [[Int]]();
tri[0][0] = 321;
This code causes this error:
fatal error: Index out of range
What's wrong?
You're accessing the first element of the first subarray of the array. But your array doesn't contain any subarrays, so it crashes.