Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
Dannyu NDos's user avatar
  • 6,391
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 ...
Erel Segal-Halevi's user avatar
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 ...
Philippos's user avatar
  • 2,660
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 ...
Olipro's user avatar
  • 199
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 ...
Joseph's user avatar
  • 115
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 ...
The Thonnu's user avatar
  • 18.3k
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 ...
Kevin Cruijssen's user avatar
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 ...
Bubbler's user avatar
  • 78.3k
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 ...
george's user avatar
  • 1,792
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 ...
Wheat Wizard's user avatar
  • 99.6k
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 ...
Hood's user avatar
  • 2,115
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 ...
Bubbler's user avatar
  • 78.3k
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 (the horror!). In this challenge, you will be given some ...
rydwolf's user avatar
  • 18.9k
-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}(...
Wasif's user avatar
  • 12.3k
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 ...
Aiden4's user avatar
  • 2,485

15 30 50 per page