DEV Community

Discussion on: Daily Coding Puzzles - Oct 29th - Nov 2nd

Collapse
 
bodonferenc profile image
Ferenc Bodon

Q/kdb+ solution (let l be the input list):

with list multiplication:

sum l * 2 xexp reverse til count l

with adverb over:

{y + 2*x} over l