Top new questions this week:
|
The look-say sequence is a sequence of lists of numbers where each element is the previous element with run length encoding. Run length encoding is the process of grouping together like elements and …
|
Write a program or function (hereafter “function”) that returns or prints the source code of four new functions: Increment, decrement, undo, and peek. The initial function contains an …
|
Python string parsing has quite a few edge cases. This is a string: “a” Putting 2 strings immediately after each other implicitly concatenates them, so …
|
Find the max number of Xs you can fit onto a rectangular tic-tac-toe board of length l and height h without ever having 3 consecutive Xs in a row diagonally, horizontally, or vertically. This is a …
|
The cardinality of the set \$\mathbb Q\$ of rational numbers is known to be exactly the same as that of the set \$\mathbb Z\$ of integers. This means that it is possible to construct a bijection …
|
Computers like binary. Humans like base 10. Assuming users are humans, why not find the best of both worlds? Your task is to find the first n terms in the sequence …
|
Given a string and a substring and a positive integer n. Remove the n occurences of a substring from the end of the originally …
|
Greatest hits from previous weeks:
|
Note: a 1000 point bounty is still available for this challenge, which I will create and award if anyone takes the top score without using built-in compression. Below is a …
|
Fizz Buzz is a common challenge given during interviews. The challenge goes something like this: Write a program that prints the numbers from 1 to n. If a number is divisible by 3, write Fizz instead….
|
In this challenge, users will take turns completeing three fairly simple coding tasks in programming languages that are allowed to be progressively older. The first answer must use a programming …
|
Write the shortest code you can that produces an infinite output. That’s all. You code will only be disqualified if it stops producing output at some point. As always in code golf, the shortest code …
|
2048 is an incredibly fun and addictive game in which the goal is to create a tile with 2048 on it. Here’s a short description of the game: Pressing an arrow key will slide all the blocks in the …
|
Challenge I need help building a brick wall! Throw together some code for me using no input and produce the following output wall shown below: …
|
I’m work on a problem which I set myself for fun, which is to create a python script which prints the even numbers from 0 to 100. The challenge is to make the script as small as possible. This is what …
|