# All Questions

10,438 questions
301 views

### Check if all vowels exist in pairs of strings [closed]

Your program should find the number of string pairs (pairs of 2) that contain all vowels (a e i o u), when given an integer N and ...
2k views

### Compare four integers, return word based on maximum

This function should take four integer inputs (a,b,c,d) ...
171 views

### (bit)Wise Images [closed]

Given a truth table and two images, use the truth table as a bitwise operation to the two images. For example with the truth table: 1 0 1 0 0 0 1 0 (Note that ...
601 views

### Compound Interest… with Wizard Money

Gringotts isn't just a vault, but a reputable financial institution and wizards need loans too. Since you don't want to be screwed over by the Gringotts goblins, you decided it would be a good idea to ...
577 views

### Arrays Start at $\pi$

Your task is to take an array of numbers and a real number and return the value at that point in the array. Arrays start at $\pi$ and are counted in $\pi$ intervals. Thing is, we're actually going ...
251 views

### 45 degree quine [closed]

A very simple golf this time, but should be fun to do. Challenge Output your code, but rotated 45 (or -45) degrees. E.g: lorem ipsum dolor sit amet becomes <...
227 views

### Average Idle-Dice Rolling

So I ran into this progressive/idle game cleverly called Idle Dice. Has a variety of random effects applied to a pretty typical progression formula game. Warning, time sink! Play at your own risk. ...
298 views

### Unique Brick Tilings Within A Rectangle

I was browsing Stackoverflow and saw this question about tiling an MxN rectangle, and I thought it would be great for golfing. Here is the task. Given the dimension M and N, write a program that ...
899 views

### Jumping Numbers

A jumping number is defined as a positive number n which all pairs of consecutive decimal digits differ by 1. Also, all single digit numbers are considered jumping numbers. eg. 3, 45676, 212 are ...
222 views

### Implement MENACE

Background MENACE (Machine Educable Noughts And Crosses Engine) is a rudimentary shallow machine learning algorithm for the game Noughts and Crosses, created by British computer scientist Donald ...
8k views

### Historical difference between / and ÷ in mathematical expressions

Introduction: Inspired by a discussion that is already going on for many years regarding the expression $6÷2(1+2)$. With the expression $6÷2(1+2)$, mathematicians will quickly see that ...
278 views

### Swapless distances

Suppose you have a string $s_0$ and someone else has a hidden string $s_1$. You don't know what $s_1$ is but they tell you that they can get from your string, $s_0$, to their string by making ...
21k views

### It took me a lot of time to make this, pls like. (YouTube Comments #1)

Hold up..... this isn't trolling. Background These days on YouTube, comment sections are littered with such patterns: ...
12k views

### Am I a Rude Number?

For a while now, I've been running into a problem when counting on my fingers, specifically, that I can only count to ten. My solution to that problem has been to count in binary on my fingers, ...
394 views

### Generate a Baseball Pitch String

Goal Write a program or function that takes a positive integer n and randomly generate a legal series of pitches (a Pitch string) of length ...
3k views

### Play Zip, Zap, Zop

There's a little improv warm up game where you arrange yourselves in a circle and send zips, zaps, and zops around by pointing to a person and saying the next word in the sequence, then they do the ...
507 views

### Check type of an integer

You will receive an integer less than 2000000000 and bigger than -2000000000 and you have to test what type(s) of number this is out of: ...
264 views

### Floating over the integers

As you may know, the typical binary floating point numbers in a computer language are quite different than the typical integer numbers in a computer language. Floating point numbers can represent a ...
2k views

### Square Root Distance from Integers

Given a decimal number k, find the smallest integer n such that the square root of n is ...
409 views

### A nasty little memory leak

Below Python code generates memory leak. Challenge: Fix the memory leak with minimal changes to the code as measured by Levenshtein distance to the original code. You may only change the code before ...
15k views

### Eww, those bytes are gross

Write a program or function that, when given a string, filters out as many distinct bytes as it can and returns the cleaned string. However, since your program hates them, none of these bytes can be ...
2k views

### Count repetitions of an array

You will receive an array and must return the number of integers that occur more than once. [234, 2, 12, 234, 5, 10, 1000, 2, 99, 234] This will return 2, since ...
528 views

### Error-detecting Self-repairing Program

Your task is to create a program where if any one character is deleted, it will detect which character was deleted and then re-insert the deleted character in its own source file. For instance, if ...
540 views

### Fizzbuzz in any base

Challenge Input: An integer $b$ between 2 and 62 (inclusive). Output: Count from $1$ to the equivalent of $5000_{10}$ in base $b$, using any reasonable representation for the digits. ...
7k views

### Crack the bank account's password!

Introduction In order to prevent keyloggers from stealing a user's password, a certain bank account system has implemented the following security measure: only certain digits are prompted to be ...
221 views

Challenge Return the full contents of your program, but inverted. How do your invert something? Well, Letters: Take the position of the letter in the alphabet, subtract from 26, and use the letter ...
308 views

### Can this container hold this much liquid?

Can this container hold this much liquid? Challenge Synopsis As you most likely know, liquids have an indefinite shape and a definite volume. As such, they always take the shape of their container. ...
2k views

### Exploding Numbers

sandbox (deleted) Lets define a matrix of 9s as: $$N = \begin{bmatrix} 9&9&9\\9&9&9\\9&9&9 \end{bmatrix}$$ Lets define an exploding number as a number at position $(x,y)$...
2k views

### Build ASCII Podiums

In sporting competitions, it often happens that winners are presented on podiums, with the first-place person on the highest in the middle, the second-place person on the middle height to the left, ...
176 views

### Python code to produce C++14 hex integer literal with ticks

tl;dr? See bottom for The Competition Integer literals While programming, the 64-bit hexadecimal literal 0x123456789abcdefL is difficult to gauge the size of. I ...
1k views

### What have we got?

Inspired by, and in memory of, our beloved genius, R.I.P. He invented and implemented dfns — his magnum opus and the subject of the challenge. For the interested: latest full dfns documentation and ...
504 views

### Left Center Right (LCR) code golf

At a party, I was introduced to the game LCR. Now it's not a great game as there's no skill but only random chance. But it got me thinking, I could code this, and I made a quick program in R to model ...
523 views

### 2-Dimensional Bubble Sort

Sorting makes no sense for a 2-dimensional array... or does it? Your task is to take an input grid and apply a bubble-sort-like algorithm to it until all values in the grid are non-decreasing from ...
908 views

### Finding Gaps in Date Ranges

Given a list of date ranges r as input, output or return any ranges not found in r. For the sake of this example, input will be ...
854 views

### Arbitrary Interval Ruler

Make a program that takes a length and list of intervals and outputs a ruler of that length with longer ticks for each interval using the line drawing characters ...
14k views

### Sing Baby Shark

"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. - ...
936 views

### How fast can I say your program?

I recently decided to download some dictation software, in order to help with my writing. However, it doesn't work very well when I'm coding, since I have to change from saying words to symbols and ...
268 views

### Return Spiral Indexes!

Spirals are cool , so are numbers, and number spirals are even cooler. But what if I want a specific number, in a specific place using xy coordinates... Challenge Using an infinite spiral moving ...
390 views

### Cell phone Charge

Challenge Taken with permission from my University Code Challenge Contest The dependence we have on mobile phones makes us charge them every night up to the maximum level of the battery, so we do not ...
382 views

### The Great Pyramid of Quine

The task is a rather simple quine challenge with a twist, you must output your source code in the shape of a pyramid. The shape of a pyramid is defined below: ...
2k views

### The Highest Dice

Challenge: Here we have the first 100 items of a sequence: ...
570 views

### How lit is this room? 🔥 pt. 1

Related to this question. A room is defined to be a (not necessarily convex) non-intersecting polygon, expressed as an ordered list of 2-dimensional coordinates. A sufficiently bright lightbulb is ...
1k views

### Meta-bowling Golf

Your task is to create the shortest program (A) that outputs another program (B) with the most unique bytes, which in turn outputs the original program (A). Essentially, you are golfing one half of a ...
532 views

Not to be confused with Password Bishop Goodness! Given a string, answer (truthy/falsy or two consistent values) if it constitutes a password which is strong against bishops. A password is strong ...
526 views

### Drawing a tree from an array

Given a possibly nested, non-empty array of single-digit positive integers (not guaranteed unique), output the ASCII-art representation as a tree, using the box-drawing characters ...
4k views

### The 465 Arrangement

Here's the challenge. Write some code to output all the integers in a range. Sounds easy, but here's the tricky part. It will start with the lowest number, then the highest. Then the lowest number ...
2k views

Derived from this, now deleted, post. Given a string, answer (truthy/falsy or two consistent values) if it constitutes a good Bishop password, which is when all the following conditions are met: it ...
228 views

### Print “beep boop bop” using complicated methods [duplicate]

This challenge is pretty simple: you need to alert / print / show to the user the text "beep boop bop" (or "beep\nboop\nbop", with newlines), but it needs to be obfuscated. (where you couldn't see ...