All Questions

11,228 questions
Filter by
Sorted by
Tagged with
207 views

Find the largest recurring prime

Inspired by Find the largest fragile prime A recurring prime (or whatever you choose to call it) is a prime that, when removing leading digits, always remain prime regardless of how many digits are ...
51 views

Heuristic pseudo-prime generator [closed]

Your task is to write a program that accepts an input N and outputs an integer p in the range [2,N]. (2 to N inclusive) As the title mentioned, the output p must be a probable pseudo-prime. How I ...
50 views

Merge Singly Linked Lists in between [closed]

Merge list2 into list1, between a and b ...
56 views

SKIO calculus solver [closed]

Make a program that calculates SKIO calculus output of a given string. Instructions: Take a binary string as input. Output the result. Write it in as short as you can. Shortest code wins. More at ...
339 views

Sort list by types

Rules You have a list (L) that contains integers and strings. Your task is to move all strings to the end of the list and all integers to the beginning of the list. It is a code-golf so the lowerest ...
104 views

Hash bomb filtrate

Pipe a short stream to the following Java program run with accompanying command line options, such that it prints true. ...
538 views

Drawing one-liner

CodeDrawing one-liner Teaser Behold this formidable drawing: Can you draw this in a single stroke? Give it a try. Can you do this one, now: Give it a try. How it works These "make this drawing ...
2k views

Fastest yes in the west

There has been a question about yes in the past, but this one is slightly different. You see, despite yes having a rather long size, it is incredibly fast. Running ...
64 views

Interpret CJS inside of Javascript. Raw Strings [closed]

Background: Javascript has a built in function. Eval. The Evil Eval. We know its issues, and we know its one and a very rare while uses. I wanted to see someone emulate CJS in JS, which is a made up ...
1k views

Context Just look around! Whenever someone posts an answer, the same template is followed over and over again! A first line with the byte count and language name. Then the code. Then the TIO link. ...
1k views

Integer Logarithm

Objective Take $a \in ℤ_{>1}$ and $b \in ℤ_+$ as inputs. Write a function $f$ such that:  f(a,b) = \left\{ \begin{array}{ll} \log_ab & \quad \text{if} \space \log_ab \in ℚ ...
480 views

Are They Similar Polygons?

Task Given the x,y coordinates (coordinates are guaranteed to be integers) of the vertices of two simple polygons in clockwise or anti-clockwise order. Output a Truthy value if both the polygons are ...
89 views

Predictor Generator [closed]

Write a program that when given a string $S$, it generates a program of the same language as itself. The generated program, when given a continuous substring of $S$, should predict the next ...
446 views

Count regex matches

Your task Given a simple regular expression, you have to count how many strings of length n have a match of length n with the ...
232 views

Problem description Vertices $V$ of directed graph $G=(V,E)$ represent gossipping ladies; edge $(u,v) \in E$ signifies that lady $u$ knows of lady $v$ (which does not imply that lady $v$ ...
2k views

Is it a doubling sequence?

A doubling sequence is an array of numbers where each subsequent number is at least twice the previous number. Given an ordered list of numbers, determine if the numbers in the list ($n_{x}$) have ...
262 views

Find the most important character

Find the most important character The challenge is to write a program that outputs the most occurrent character in the input string, excluding these bracketing characters ...
7k views

Is this a triangle?

Task Write a function/program that, given three positive integers a, b and c, prints a ...
65 views

Draw a sierpinski triangle in python using recursion [closed]

How to draw this shape by just using draw(level, length)?
152 views

Computational Parity Party! [duplicate]

The computational parity of an integer is defined as 1 if the integer has an odd number of set bits, and 0 otherwise. (src). Input You will receive one nonnegative integer that you will take the ...
2k views

Reversed Iota's

I didn't invent this challenge, but I find it very interesting to solve. For every input number, e.g.: 4 Generate a range from 1 to that number: ...
198 views

Combinations of stepwise increasing integers

Working on something in probability theory, I stumbled across another combinatorical exercise. These are always fun to solve, searching for intelligent approaches. Of course, one can use brute force ...
115 views

Regex Golf: Find all escaped characters in a Wikipedia page on the subject of escape character overuse [closed]

Every match should include both the escape character and the escaped character. https://en.wikipedia.org/wiki/Leaning_toothpick_syndrome Rules: You can perform the search on the content of the ...
2k views

10-pin bowling split spare

Bowling Bowling is a game where, essentially, each player gets 10 turns to: Take 2 attempts at knocking down 10 pins arranged in a triangle. between turns the pins are reset from the 1st to the 2nd ...
49 views

Shortest Sorting algorithm [duplicate]

So, you need to create the shortest sorting algorithm with a resonably fast run time. It could be any sorting algorithm. Test code: ...
4k views

Lonely Multiplication

Based on this question from Code Review. Given precisely three positive integers, return the product of all of the distinct inputs. If none of the inputs are distinct, return 1. That is, implement ...
101 views

Self-loathing program/function [duplicate]

Simple task, write a program/function that returns error if and only if presented with itself. The program must give a valid output for any input other than itself. For the error part, you can only ...
92 views

Let's learn a bit French: 99 Bottles [duplicate]

The 99 bottles in French The lyrics of the song goes like this: ...
125 views

Name an arbitrary string [closed]

This should be easy: given an arbitrary string, your program will give it a name. Requirements Your program will accept an input of a UTF8 string, and output a string representing the input's "name",...
175 views