Top new questions this week:
|
proposed by @Adám in chat Given an even number of finite points return a line \$y=mx+b\$ that evenly splits the points on both sides. Specs Take a list of distinct points \$(x,y)\$ (or a list of x-…
|
Description The Gameboy stores tiles as 2 bit-per-pixel 8×8 images, thus 16 bytes. Every two bytes is a complete row with all of the Low-bits of each pixel in the first byte, and all of the High-bits …
|
Let a counting tree be a rooted tree in which every node is labeled with the number descendants it has. We can represent such trees as ragged lists with each node being represented by a list …
|
Write a program that, for any \$n\$, generates a triangle made of hexagons as shown, \$2^n\$ to a side. The colors are to be determined as follows. We may give the triangle barycentric coordinates so …
|
This challenge is simple: Take a path to an png image file as input and overwrite that file with a copy of itself rotated 90 degrees clockwise. You may assume that …
|
A Latin square of order n is text which is arranged as a square of n lines by n columns, contains n different characters, and each character appears once in each line and column. For example, here is …
|
Given an ASCII art with simple closed paths using | and – (pipes and dashes), output a random point inside the boundary. Eg. …
|
Greatest hits from previous weeks:
|
I’m pretty sure there’s not a better way to do this but figured it couldn’t hurt to ask. I’m tired of typing out a=’abcdefghijklmnopqrstuvwxyz’. Cool languages …
|
Print or return the following string: zottffssentettffssenttttttttttttttttttttffffffffffffffffffffsssssssssssssssssssseeeeeeeeeennnnnnnnnno This is the first …
|
There have been many other flag challenges posted but not one for the national flag of France. This week seems like an appropriate time. Produce this flag in the fewest bytes possible: The image must …
|
Try to write some code in your language and make it not satisfying our criteria of being a programming language any more. A language satisfies our criteria (simplified version for this challenge) of …
|
Introduction The game Minecraft has a 1 in 10000 chance of showing “Minceraft” instead of “Minecraft” on the title screen. Your challenge Your challenge is to code a function or …
|
“Baby Shark” is a children’s song about a family of sharks. Having long been popular as a campfire song, it has been popularized since the mid-2000s by social media, online video and radio. – …
|
You are given two true color images, the Source and the Palette. They do not necessarily have the same dimensions but it is guaranteed that their areas are the same, i.e. they have the same number of …
|
Can you answer this question?
|
It can be easily proven using Hall’s marriage theorem that given fixed \$n\$ and \$k<n/2\$, there is an injective (one-to-one) function from all \$n\$-bit strings with \$k\$ ones to \$n\$-bit …
|