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 »

Posts by xnor‭

7 posts
81%
+7 −0
Challenges Print the Great Numeric Pyramid

Python 2, 76 bytes i=27 while~i:print' '*i+' '.join(`min(i,j,27-i-j)`for j in range(28-i));i-=1 Try it online! Computes the digit in row i from the bottom, position j as min(i,j,27-i-j). F...

posted 4y ago by xnor‭  ·  edited 4y ago by xnor‭

Answer
77%
+5 −0
Challenges Evaluate a single variable polynomial equation

Haskell, 20 bytes f x=foldl((+).(x*))0 Try it online! Takes input coefficients from highest degree to lowest. 21 bytes x%(h:t)=h+x*x%t x%_=0 Try it online!

posted 4y ago by xnor‭  ·  edited 4y ago by xnor‭

Answer
77%
+5 −0
Challenges Partial Sums of Harmonic Series

Python 3, 35 bytes f=lambda x,i=1:x>0and-~f(x-1/i,i+1) Try it online! Subtracts each 1/i in turn from the initial value until the result is no longer positive.

posted 4y ago by xnor‭  ·  edited 4y ago by xnor‭

Answer
75%
+4 −0
Challenges "Hello, World!"

Python 2, 20 bytes print"Hello, World!" Try it online!

posted 4y ago by xnor‭

Answer
71%
+3 −0
Challenges Weave Strings Together

Haskell, 40 bytes f((h:t):r)=h:f(r++[t]) f(_:r)=f r f _=[] Try it online!

posted 4y ago by xnor‭  ·  edited 4y ago by xnor‭

Answer
66%
+2 −0
Challenges Longest Increasing Subsequence

Haskell, 37 bytes f(h:t)=max(1+f[x|x<-t,x>h])$f t f _=0 Try it online!

posted 4y ago by xnor‭

Answer
60%
+1 −0
Challenges Shape of an array

Python 2, 37 bytes l=input() while 1:print len(l);l=l[0] Try it online! This makes heavy use of programs being allowed to terminate with error, which I assume is allowed by default because ...

posted 4y ago by xnor‭

Answer