Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Activity for panadestein‭

Type On... Excerpt Status Date
Edit Post #293582 Initial revision 11 days ago
Answer A: Expand a polynomial
[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 B...
(more)
11 days ago
Edit Post #293578 Initial revision 12 days ago
Answer A: Find all unique quintuplets in an array that sum to a given target
[BQN], 31 bytes {⍷(+´⊸=⟜𝕩∧5=≠)¨⊸/⥊(↕2¨𝕨)/¨<∧𝕨}´ This block function returns the empty array ⟨⟩ if the conditions cannot be satisfied. It works by sorting the input list to prevent having to filter additional combinations, then we generate the power set and filter the length 5 lists that sat...
(more)
12 days ago
Edit Post #293571 Initial revision 15 days ago
Answer A: Partial Sums of Harmonic Series
[BQN], 23 bytes {𝕩{𝕊⍟(𝕗>·+´∘÷1+↕)𝕩+1}1} This recursion is more complicated than it should, but I managed to keep it purely functional. I use a modifier to mimic passing a left argument, that's why we have the 𝕗 inside the recursion test. [BQN], 17 bytes ⌊0.5+·⋆⊢-0.57722˙ I don'...
(more)
15 days ago
Edit Post #293567 Initial revision 16 days ago
Answer A: Display a Progress Bar
[BQN], 32 bytes (']'∾˜''∾@+45+50↑79⥊˜·⌊×⟜50÷⊢)´ A tacit function. A pity, I had to add the parenthesis so I can fold the list of values that represent the fraction. Otherwise, assuming left and right argument like any BQN function, it would be 29 byes. I use BQN's character arithmetic to in...
(more)
16 days ago
Edit Post #293556 Post edited:
17 days ago
Edit Post #293556 Initial revision 17 days ago
Answer A: Borromean coprimes
[BQN], 27 bytes •math.GCD{∧´∘⥊(1=𝔽´)∧1<𝔽⌜˜} Booleans in BQN are the integers 0‿1. Try all test cases on the: BQN online REPL
(more)
17 days ago