Post History
BQN, 15 bytes ⊢(«∘⊢-×)´˜1∾˜≠˜ A 3-train (fold with initial): we zero list of the same length as the input with a one appended (the base case), then for each root we do the multiplication by the...
Answer
#1: Initial revision
# [BQN], 15 bytes ⊢(«∘⊢-×)´˜1∾˜≠˜ A 3-train (fold with initial): we zero list of the same length as the input with a one appended (the base case), then for each root we do the multiplication by the variable (a shift), and the multiplication by the number. Coefficients in descending order [BQN online REPL][Try] [BQN]: https://mlochbaum.github.io/BQN/ [Try]: https://mlochbaum.github.io/BQN/try.html#code=UCDihpAg4oqiKMKr4oiY4oqiLcOXKcK0y5wx4oi+y5ziiaDLnApQwqgg4p+o4p+o4p+pLCBbMV0sIFsxLCAyXSwgWzEsIDFdLCBbMSwgMiwgM13in6k=