Problem 895. Generate N equally spaced intervals between -L and L

Created by @bmtran

Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments.

For example, if L = 3 and N = 2

    y = [ -3 0 3 ]

Tags

Problem Group

46 solvers submitted 78 solutions (1.7 solutions/solver).