All Questions
36
questions
10
votes
12
answers
2k
views
Encrypting Emojis
Problem
You are tasked with creating a program that performs emoji encryption on a given string of emojis. In this encryption scheme, each emoji is replaced by a unique character (from ...
13
votes
8
answers
703
views
Generate all linked chains
A followup to this challenge by Jeremy Collprav, inspired by DLosc solving this in Regenerate. Some sections copied from the linked challenge.
Linking chains
We define a chain to be a string ...
8
votes
32
answers
1k
views
Keep elements in sequence that have a letter repeated at least 3 times
Challenge:
Given the input array l with a list of strings, only keep the elements in the sequence that have a letter that's repeated at least 3 times. Like ...
19
votes
16
answers
2k
views
Infinite quote escaping sequence
Related
We start with the string a, and forever append to the string a comma followed by the string quote-escaped, where quote-escaping means doubling all quotes in ...
11
votes
3
answers
359
views
Help me count the Omer
During the 49 days between Passover and Pentecost, Jewish liturgy provides four numerical problems that I've here phrased as code golf problems.
Input/Arguments
These four, in any order, and by any ...
13
votes
11
answers
1k
views
Variable length Fibonacci word
Challenge
For any two non-empty strings A and B, we define the following sequence :
F(0) = A
F(1) = B
F(n) = F(n-1) + F(n-2)
Where ...
10
votes
15
answers
1k
views
Merge Two Paragraphs with Removing Duplicated Lines
Challenge
The goal of this challenge is to make a function that takes two paragraphs and output a concatenated result with removing the duplicated overlapped lines due to redundancy (but a single copy ...
18
votes
23
answers
2k
views
Create an Accurate How-To Article
Here is an easy-intermediate challenge for anyone interested!
What is that?
A thing me and brother do a bit too often is this:
One of us has a problem and asks the other to explain how to do certain ...
39
votes
126
answers
5k
views
Lolololololololololololol
Let us take a break from the brain-wrecking questions and answer some of the simpler ones
You have recently read something extremely funny, and want to express your laughter to the world! But how can ...
-3
votes
2
answers
331
views
Shorten String as Much as Possible [closed]
Introduction
In a list of strings, there is a certain length you can shorten strings to before they become indistinguishable. This is a pretty bad explanation, so here is an example.
...
3
votes
0
answers
80
views
Mutation chain generator [duplicate]
Given a start word and a target word, print the "mutation chain" that starts at the start word and ends at the target word.
You may assume both words are lowercase and only have alphabetic characters....
1
vote
0
answers
60
views
Count using letters [duplicate]
What to do?
Starting from a, count in the sequence:
...
3
votes
1
answer
161
views
Sorting out redundant text from screen scraper application [closed]
You are writing a screen scraper application monitoring a text-only chat window. Text is added at the bottom of the window.
The application takes screenshot of the chat window. If a change has ...
10
votes
26
answers
2k
views
A function to take three integers and return a list of integers and alphabet-letters
Challenge
We take three positive integers a, b, and c as input. Using these integers, first ...
17
votes
15
answers
4k
views
Help my son find his letters
Background
Based on a game my four-year-old got from his rabbi.
The "goal" is to "find" the letters in a given order, e.g. aecdb. You are given ...
7
votes
3
answers
1k
views
The Missing Number - Version 2
Background:
This question is a remix of the one that I made previously on this forum. The only difference with this one is: the range is significantly larger, AND dynamic. Details below!
Also, I'm ...
23
votes
4
answers
3k
views
The Missing Number Revised
Background:
I originally posted this question last night, and received backlash on its vagueness. I have since consulted many personnel concerning not only the wording of the problem, but also its ...
5
votes
7
answers
584
views
Generate every ASCII string [duplicate]
Description
There are an infinite number of ASCII strings. Write a program that will output every possible ASCII string exactly once.
The ordering does not matter, but you must be able to show that ...
41
votes
91
answers
5k
views
Output the missing integer
You will be given a string. It will contain 9 unique integers from 0-9. You must return the missing integer. The string will look like this:
...
0
votes
1
answer
123
views
CSV cleanup: remove all in col after ( [closed]
Problem
Given a file with:
...
25
votes
12
answers
1k
views
Find the original string, without the repetition without the repetition in the middle
Sometimes it happens that while typing a sentence, I am distracted and I end up typing the same couple of words twice couple of words twice in succession.
To make sure make sure other people are not ...
38
votes
22
answers
3k
views
Leaping Kangaroos
Backstory
Disclaimer: May contain made up information about kangaroos.
Kangaroos traverse several stages of development. As they grow older and stronger, they can jump higher and longer, and they ...
25
votes
2
answers
705
views
On this site we obey the laws of thermodynamics!
And in particular the second law: the entropy of an isolated system undergoing an irreversible process increases with time.
For this challenge,
An "isolated system" will be taken to be a ...
17
votes
8
answers
2k
views
A047841: Autobiographical numbers
Definition
Here is the process to describe a number:
For each number from 0 to 9 that is present in the number:
Write down the ...
15
votes
20
answers
979
views
Print/Output all positive numbers in which every multi-digit substring in its decimal representation is also prime.
Task
Your task is to print or output all positive numbers in which every multi-digit substring in its decimal representation is also prime. If the number has at least 2 digits, this would imply that ...
4
votes
3
answers
223
views
Taylor Series of a Function with Periodic Derivatives
Taylor series are a very useful tool in calculating values of analytic functions that cannot be expressed in terms of elementary functions, using only information about that function at a single point....
38
votes
38
answers
4k
views
Making a coin fair
You have a coin that produces 0 or 1. But you suspect the coin may be biased, meaning that the probability of ...
20
votes
5
answers
751
views
Find the missing number in an undelimited string
The challenge is to identify the missing number in a string of undelimited integers.
You are given a string of digits (valid input will match the regular expression ...
33
votes
34
answers
3k
views
Say What You See
The "Look and say" or "Say what you see" sequence is a series of numbers where each describes the last.
...
10
votes
1
answer
525
views
Help me fill my wallet!
A while ago I purchased a new wallet which is able to hold 8 cards (4 on both side). However, I seem to have way more cards than that and I need to make choices on which ones I want to carry with me. ...
40
votes
57
answers
5k
views
Generate the Abacaba sequence
This challenge is about printing the abacaba sequence of a specific depth.
Here is a diagram of the first 5 sequences (a(N) is the abacaba sequence of depth N, ...
17
votes
34
answers
2k
views
Spell out the Revu'a
Actually not inspired neither by Atbash Self Palindromes nor by Generalized Gematria Calculator.
Given a string s of length n, output the Revu'a sequence, which is the first character of s, the first ...
14
votes
5
answers
2k
views
Play the word chain
When I was younger, I use to play a word game called Word chain. It was very simple. The first player chooses a word; the next player says another word that starts with the same letter the previous ...
20
votes
2
answers
511
views
Maximal Substring Construction
In this challenge, you are passed two things:
A string length, N
A list of strings, L, each with an assigned point value. Any ...
31
votes
6
answers
2k
views
Have you been nice this year?
Introduction
Santa has too many names to process, and needs your help! He needs you to write a program or a function, which outputs nice, ...
39
votes
24
answers
3k
views
Triangulating Text
Write a program or function that takes in a string guaranteed to only contain printable ASCII characters except for space, and to be a positive triangular number (1, 3, 6, 10, 15, ...) in length.
...