All Questions
56
questions
14
votes
16
answers
2k
views
Reduce a string up to idempotency [closed]
Objective
Given a string consisting of printable ASCII characters (!0x21 ― ~0x7E), treat it as an element in the free idempotent ...
13
votes
13
answers
2k
views
Compute the degree of a string
The input is a string made of the letters a,b,c only. The output is an integer representing the degree of the sequence. The degree of a sequence is computed as follows:
Assume that each of the ...
11
votes
8
answers
1k
views
Night hike partitioning
We want to go on a night hike with the youth group, but of course not everyone has their torch, even though we told them we planned to split up. What options are there for group formation if n teens ...
9
votes
8
answers
696
views
Produce the shortest suffix for an (almost) arbitrary string
I encountered some silly code from a game and I figured this would actually turn into a fun golfing problem, so:
Given any ASCII string in the limited char range specified below.
Append as few ...
9
votes
12
answers
3k
views
Funny Numbers :D
The task is to calculate the average "funniness" of a given number given the following scoring system:
1 point for each "420" in it
2 points for each "69" in it
3 points ...
25
votes
49
answers
2k
views
Maximum average ord
Your task
Take a list of strings as the input, and output the maximum average ord.
Example
Given the list ...
22
votes
8
answers
3k
views
ASCII-Art n'th Root
Challenge:
Given two integers \$a\$ and \$b\$, with lengths \$A=length(a), B=length(b)\$, output an ASCII-art of the \$a^{th}\$ root of \$b\$, including the answer rounded to \$A\$ amount of decimal ...
19
votes
12
answers
2k
views
How many values of this type?
Background
The number of values for a given type is called the cardinality of that type, and that of type T is written as |T|.
Haskell and a few other languages ...
6
votes
18
answers
912
views
Written Word Equation
Word equations, but not as you know it! Given a sentence which will include two numbers, numerically, and a spelt operator, in the order seen in the examples, your goal is to give the numerical answer
...
10
votes
5
answers
444
views
Rewrite strings without changing their order
Lexicographic Ordering
For this challenge we will be talking about the lexicographic ordering of strings. If you know how to put words in alphabetical order you already understand the basic idea of ...
24
votes
25
answers
1k
views
Multiply elements of the dihedral group
This is a copy cat question of Simplify ijk string applied to the other nonabelian group of order 8. See also Dihedral group composition with custom labels.
Challenge
Given a string made of ...
45
votes
27
answers
3k
views
Simplify ijk-string
Related: Multiply Quaternions
Challenge
Given a string made of ijk, interpret it as the product of imaginary units of quaternion and simplify it into one of the ...
19
votes
17
answers
772
views
Convert superscripts to MathJax
CGCC hasn't always had MathJax. Back in the dark ages, it would have been necessary to write \$x^2\$ as x² (the horror!). In this challenge, you will be given some ...
-6
votes
17
answers
405
views
Inverse Ax+B/Cx+D sized function
Let's assume that
$$
f(x) = \frac{Ax+B}{Cx+D}
$$
Where, \$x\$ is a variable and \$A\$,\$B\$,\$C\$,\$D\$ are constants.
Now we have to find out the inverse function of \$f(x)\$, mathematically \$f^{-1}(...
23
votes
18
answers
1k
views
Interpret Interval Notation
Interval notation is a way to write complicated range bounds more conveniently and concisely than writing an inequality. The challenge, should you choose to accept it, is to write a program or ...