@@ -9,6 +9,7 @@ There are two general solutions covered here.
99| | Solution | Link |
1010| :-------: | :--------------------------------------------------------------------------: | :---------------------------------------------------------------------------: |
1111| APL | ` mco ← {0⌈⌈/(≢¨⊆⍨)⍵} ` | [ Link] ( https://github.com/codereport/LeetCode/blob/master/0015_Problem_1.apl ) |
12+ | Kap | ` Mco ⇐ ⌈/≢¨⊂⍨ ` |
1213| J | ` mco =. [: >./ [: (#;._1) 0,] ` <br > ` mco =. {{ >./ (#;._1) 0,y }} ` | [ Link] ( https://github.com/codereport/LeetCode/blob/master/0015_Problem_1.ijs ) |
1314| BQN | `` Mco ← ⌈´·+´¨(+`¬)⊸⊔ `` | [ Link] ( https://github.com/codereport/LeetCode/blob/master/0015_Problem_1.bqn ) |
1415| Uiua | ` Mco ← /↥⊜⧻. ` | |
@@ -29,12 +30,13 @@ There are two general solutions covered here.
2930| | Solution | Link |
3031| :-------: | :--------------------------------------------------------------: | :---------------------------------------------------------------------------: |
3132| APL | scan is broken | |
33+ | Kap | ` mco ⇐ ⌈/⊢«×»+\ ` | |
3234| J | ` mco =. {{ >./(([*+)/\.)&.\|. y }} ` | |
3335| BQN | `` Mco ← ⌈´(⊢×+)` `` | [ Link] ( https://github.com/codereport/LeetCode/blob/master/0015_Problem_1.bqn ) |
3436| Uiua | ` Mco ← /↥\(×+,) ` | |
3537| Q | ` mco: { max {y*y+x} scan x } ` | |
3638| Julia | ` accumulate((a,b) -> b*(a+b), x) \|> maximum ` | |
37- | MATLAB | no scan |
39+ | MATLAB | no scan | |
3840| NumPy | ` np.max(np.frompyfunc(lambda a,b: b*(a+b), 2, 1).accumulate(x)) ` | |
3941| R | ` max(Reduce(function(a,b) b*(a+b), x, accumulate=TRUE)) ` | |
4042| Nial | scan is broken | |
0 commit comments