Activity for xnor
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #279625 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Longest Increasing Subsequence [Haskell], 37 bytes f(h:t)=max(1+f[x|xh])$f t f =0 Try it online! (more) |
— | almost 4 years ago |
Edit | Post #279456 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279457 | Initial revision | — | almost 4 years ago |
Answer | — |
A: 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 it is on SE. We repeatedly print the length, and then replace the list with its firs... (more) |
— | almost 4 years ago |
Edit | Post #279456 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279456 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279456 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279456 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279456 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279456 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Weave Strings Together [Haskell], 40 bytes ```haskell f((h:t):r)=h:f(r++[t]) f(:r)=f r f =[] ``` Try it online! (more) |
— | almost 4 years ago |
Edit | Post #279370 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279370 | Initial revision | — | almost 4 years ago |
Answer | — |
A: 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. (more) |
— | almost 4 years ago |
Edit | Post #279182 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279182 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279182 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279182 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279182 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279182 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Print the Great Numeric Pyramid [Python 2], 76 bytes i=27 whilei: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)`. For comparison, a bad effect to compute the row numbers arithmetically, made ha... (more) |
— | almost 4 years ago |
Edit | Post #279159 | Post edited | — | almost 4 years ago |
Edit | Post #279160 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279160 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279160 | Initial revision | — | almost 4 years ago |
Answer | — |
A: 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+xx%t x%=0 Try it online! (more) |
— | almost 4 years ago |
Suggested Edit | Post #279159 |
Suggested edit: (more) |
helpful | almost 4 years ago |
Edit | Post #279156 | Initial revision | — | almost 4 years ago |
Answer | — |
A: "Hello, World!" [Python 2], 20 bytes print"Hello, World!" Try it online! (more) |
— | almost 4 years ago |