Code Golf

codegolf.stackexchange.com

Given a list of Integers greater than zero, Sort each of the unique values in ascending order, then repeat the process on the remaining duplicate values and append. Example: ``` [1,5,2,2,8,3,5,2,9] ==> [1,2,3,5,8,9,2,5,2] ```

4
0
youtu.be

[[the video]](https://youtu.be/iScy18pVR58) [[github]](https://github.com/SebLague/Chess-Challenge) TL/DW: The contest is to submit a C# chess bot in which the code uses a maximum of 1024 tokens. (Every usage of a variable, value, function, and operator, counts as a token)

9
1

Write a function that prints an `n` big tree, e.g. for n=5: ``` * * * * * * * * * * * * * * * | | ``` Here is what I came up with in C: ```c N,i;a(n){for(i=N=N?N:n+2;i--;printf(i?"* "+(N-n-1<i):--n?"\n":"\n%*s",N,"| |"));n&&a(n);} // the invocation isn't part of the golf: main(){a(5);} ``` PS: Code blocks currently wrap around when they are too long, I've already submitted a patch to make them scroll horizontally instead.

2
4
https://pyobfusc.com/

cross-posted from: https://programming.dev/post/24297 > [u/msage](https://programming.dev/u/msage)'s [comment](https://programming.dev/comment/70403) on another post made me remember seeing this a couple of days ago. > > ![](https://programming.dev/pictrs/image/564d1608-d26c-4282-8281-ff2c4afc0dab.png) > > From the site: > > This seems exactly like the IOCCC but for Python? > > > This contest is a complete rip-off the IOCCC idea and purpose and rules. If you like this contest, you will almost certainly love the IOCCC. Check it out!

1
0