floyds_triangle(n) that returns the first n rows of Floyd's Triangle as a list of lists of integers, where the numbers 1, 2, 3, ... fill the triangle row by row left to right (row i, 1-indexed, has i numbers), continuing the count across rows rather than restarting each row.floyds_triangle(4)
[[1], [2, 3], [4, 5, 6], [7, 8, 9, 10]]
Numbers increase continuously row by row.
Keep a single running counter that increments across the entire structure, not per row.
Outer loop controls row length; inner loop fills that many numbers using the counter.