ive got two bqn functions:
MedianOfSortedLists ← ({𝕩{2|≠𝕨 ? ⊑𝕩⊏𝕨 ; ÷⟜2+´𝕨⊏˜𝕩-1‿0}⌊2÷˜≠𝕩}∘∧∘∾)
FirstMissingPositiveInteger ← {⌊´1+/¬𝕩∊˜1+↕≠𝕩}
both as solutions to these leetcode challenges respectively:
https://leetcode.com/problems/median-of-two-sorted-arrays/
https://leetcode.com/problems/first-missing-positive/
im new to bqn, coming from apl and im wondering about some ways to refactor these expressions.
median-function:
first off, im not proud of the algorithm in and of itself. its quite imperative by nature and requires the ? if-like statement (which i love as bqns response t…