Activity for Hakerh400
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Answer | — |
A: Golf me a polygonal loader JavaScript (Browser), 670 bytes ```js for(="=1,w=):=0,w(=f(||(.join`w?q-w?q=-w(a,b=>A(L5,a),g.innerText=N=L=D=T,I=,c,d)a-d?I,b(d,cd+1c,A=)I(a,(x,y)[...y,b(x)],[](U=(Kf=({value:a})a==[a|]+[]&&aKQnFlZdOtQ-N|F-L|Z-D|O-T&&(B=Q,e=F,H=Z,V=O,K&=(V>0&V1&e0&H<=B(e-1)K&&(N=Q,L=F,D=Z,T=O,X=N-4&&L,Y,WE=N==3,... (more) |
— | almost 4 years ago |
Comment | Post #279854 |
The challenge has been updated. (more) |
— | almost 4 years ago |
Edit | Post #279854 |
Post edited: |
— | almost 4 years ago |
Comment | Post #279854 |
@celtschk String `s` is indeed the normalized string representation, but figuring that out was intended to be a part of the challenge. Regarding the order of the mapping, what's the point of mentioning that the order is not preserved? If `f` stands for converting number to set and `x,y` are natural n... (more) |
— | almost 4 years ago |
Comment | Post #279854 |
@Moshi Two separate programs are allowed now. (more) |
— | almost 4 years ago |
Comment | Post #279854 |
@celtschk Added link to "hereditarily finite" wiki article, hope all concerns are addressed now. Regarding the spaces, they are optional (mentioned that in the post, thanks). BTW, the algorithm does not produce a string, it produces a set (it says *"interpret `s` as a set and return it as the result... (more) |
— | almost 4 years ago |
Edit | Post #279854 |
Post edited: |
— | almost 4 years ago |
Comment | Post #279854 |
@celtschk The decision to avoid terms "rank" and "hereditary finite" was intentional, because they involve transfinite recursion and depend on set-theoretic axioms. The post is now edited, please let me know if the definitions are still misleading. Also, this is not the Ackermann bijection (6 is a c... (more) |
— | almost 4 years ago |
Edit | Post #279854 |
Post edited: |
— | almost 4 years ago |
Comment | Post #279854 |
@Razetime Please let me know if any recursive definition is missing a base case. (more) |
— | almost 4 years ago |
Edit | Post #279854 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279854 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279855 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279855 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Towering Cistercian Representation [JavaScript (Node.js)], 606 bytes for(="=>\\\\  =j(...(a:').join`\\n`q,/ / /	d[c[) .match(/.{.||]/g,=='.mapf=(n,m... (more) |
— | almost 4 years ago |
Edit | Post #279854 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279854 | Initial revision | — | almost 4 years ago |
Article | — |
Bijection between natural numbers and finite sets Definitions A natural number is either zero, or a successor of some other natural number. A set is an unordered collection of zero or more elements. Each element is a set. Two sets that have same elements are equal. In this challenge we consider only hereditarily finite sets. Cardinality of ... (more) |
— | almost 4 years ago |
Comment | Post #279778 |
Shouldn't 12345 look like [this](https://raw.githubusercontent.com/Hakerh400/test/2e83e758bb87b155f223170d905c0b2901e9f238/2.txt)? (more) |
— | almost 4 years ago |
Edit | Post #279822 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Integer to Roman numeral [JavaScript (Node.js)], 147 bytes f=(a,b='IVXLCDM',g=Math.log10(a)b[g].repeat(a))=>a?(e<4?j(e):e<6?j(5-e)+i:e<9?i+j(e-5):j(1)+b[g+2])+f(a%c):'' Try it online! (more) |
— | almost 4 years ago |
Edit | Post #279791 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Generate Lewis Caroll's Jabberwocky [Bubblegum], 769 bytes 074cd1dc7fb6baed2f568915ffeb6aa5c775264a9a6f77eb418f0793da59b234599dadb6804269dbb5a213a05c807b0723f79512c284f46e8dbb6b0274f1b36606988b67ea58cf68beabe10f158702fcbf4c2b30d7b4f26190901aa713e125aee132d76940aff74588831a1908d8541c09f042556a7c7e24e80370734855cd398797d016c22627e... (more) |
— | almost 4 years ago |
Edit | Post #279163 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279749 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279749 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279749 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279749 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279749 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279749 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Output 256 in many different ways JavaScript, 11 solutions !``>>1111 TIO 4444444&444444444444&444444444444444&44444444444444444 TIO 3^7^73^333 TIO (6666666|66666666666|666666666666666|666666666666666666666666666666) TIO (more) |
— | almost 4 years ago |
Comment | Post #279684 |
A language whose empty program outputs 256 has unbounded score, as someone can submit any number of empty programs as separate solutions (indeed solutions do not share any characters). Either explicitly mention that solutions must be distinct, or forbid empty programs. (more) |
— | almost 4 years ago |
Edit | Post #279627 |
Post edited: |
— | almost 4 years ago |
Comment | Post #279659 |
Computing the length of the longest finite output is called the Busy beaver function. It grows faster than any computable function. Even if you take the logarithm of the output length, or super-logarithm, or divide it by Ackermann function, or any other computable postprocessing, the quotient outputl... (more) |
— | almost 4 years ago |
Edit | Post #279642 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Reverse an ASCII string JavaScript, 25 24 bytes -1 byte thanks to @Arnauld f=([a,...b])=>a?f(b)+a:b Try it online! (more) |
— | almost 4 years ago |
Edit | Post #279563 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279627 | Initial revision | — | almost 4 years ago |
Question | — |
Given the preorder and the inorder of a tree, output the postorder Definitions A binary tree is either a `null` (leaf), or an object (node). A node contains a value (non-negative integer) and two pointers (left and right) to two separate binary trees. A binary tree can be traversed in many different ways. Here we define preorder, inorder and postorder. We defi... (more) |
— | almost 4 years ago |
Comment | Post #279621 |
It prints `2` for `[7,1,9,3,8,5,4,6,2]`, but the subsequence `1,3,5,6` has length 4. (more) |
— | almost 4 years ago |
Edit | Post #279603 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279603 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279608 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Prime Difference [JavaScript (Node.js)], 86 bytes f=(a,b=2,c=(a,b=2)=>a-b?a%b&&c(a,b+1):1,d=a=>c(++a)?a:d(a))=>!c(b)|d(b)-b<a?f(a,b+1):b Try it online! (more) |
— | almost 4 years ago |
Edit | Post #279603 |
Post edited: |
— | almost 4 years ago |
Edit | Post #279603 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Longest Increasing Subsequence [JavaScript (Node.js)], 70 56 bytes f=([a,...b],c=f)=>1/a?Math.max(f(b,c),[a]>c&&1+f(b,a)):0 Try it online! (more) |
— | almost 4 years ago |
Article | — |
Given the preorder and the inorder of a tree, output the postorder [FINALIZED] Definitions A binary tree is either a `null` (leaf), or an object (node). A node contains a value (non-negative integer) and two pointers (left and right) to two separate binary trees. A binary tree can be traversed in many different ways. Here we define preorder, inorder and postorder. We defi... (more) |
— | almost 4 years ago |
Edit | Post #279455 | Initial revision | — | about 4 years ago |
Answer | — |
A: Shape of an array [JavaScript (Node.js)], 36 bytes f=a=>a?.map?[a.length,...f(a[0])]:[] Try it online! (more) |
— | about 4 years ago |