Share Your Experience: Take the 2024 Developer Survey

# Tag Info

1 vote

### Infer pluses and minuses

T-SQL, 3378 bytes I saw this a few days ago, and was thinking of languages I could use to solve this problem. Ended up deciding to write the entire thing in a query on data.stackexchange.com because I ...
• 391

### Infer pluses and minuses

05AB1E, 14 bytes ®X‚Ig<ãʒ1š¹*OQ Two separated inputs $[a_0,...,a_{n-1}]$ and $a_n$. Output as a list of all possible results, with ...
• 127k

### Infer pluses and minuses

Haskell, 64 bytes f(x:w:y)=[q|q<-mapM(\_->[-1,1])y,sum(zipWith(*)q\$w:y)==last y-x] Try it online!
• 6,400

### Infer pluses and minuses

R, 55 bytes Takes $a_N$ as a separate argument, returns a matrix of all solutions with 1/2 for -/+. ...
• 59.5k
1 vote

### Infer pluses and minuses

Brachylog, 15 bytes {+.∧1w₄|-.∧w₄}ˡ Try it online! Outputs + as 1 and ...
• 38.7k

### Infer pluses and minuses

Python 3,  75   67  64 bytes -8 bytes thanks to Jitse (by placing the output in r - a very smart golf!). ...
• 107k

### Infer pluses and minuses

Python, 132 bytes ...
• 5,322
1 vote

### Infer pluses and minuses

Jelly, 7 bytes _,+ɗ/œẹ A dyadic Link that accepts a list of non-negative* integers*, the summands $[a_1, a_2, \cdots, a_{N-1}]$, on the left and a non-negative* ...
• 107k