Numbers Up To N
Easy · Slices
for i := 0; i < n; i++ is the C-style loop. Use it to fill 0, 1, …, n-1.
Write UpTo(n) that returns a slice of n integers starting at 0. UpTo(0) is an empty slice.
Next: Stock Lookup
Easy · Slices
for i := 0; i < n; i++ is the C-style loop. Use it to fill 0, 1, …, n-1.
Write UpTo(n) that returns a slice of n integers starting at 0. UpTo(0) is an empty slice.
Next: Stock Lookup