All Questions

7 votes
7 answers
365 views

Factoriadic Fraction Addition

Objective Given two rational numbers represented in fractional factoriadic as defined below, add them, and output the result in fractional factoriadic. Fractional factoriadic Fractional factoriadic is ...
Dannyu NDos's user avatar
  • 6,189
15 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,189
3 votes
1 answer
162 views

How comparison-heavy is this list? [closed]

Given a list of strings in any convenient format display the amount of comparisons between individual characters that a merge sort algorithm would perform. The merge-sort algorithm is a divide & ...
Kamila Szewczyk's user avatar
11 votes
5 answers
467 views

Double dequer sort

In this challenge Bubbler describes sorting a list by inserting its elements left to right into a double ended queue or "deque". Take a number from the front of the array, and push it into ...
Wheat Wizard's user avatar
  • 99.2k
9 votes
4 answers
673 views

GolfScript many-items rotation

There isn't a builtin in golfscript which lets you rotate a bigger portion of the stack than the three top-most elements. It should take one number n as argument and rotate the nth value from the top, ...
Styleurcam's user avatar
17 votes
4 answers
1k views

Substring of Fizzbuzz

Decide if a string is substring of Fizzbuzz without separation 12Fizz4BuzzFizz78FizzBuzz11Fizz1314FizzBuzz.... Notice that it doesn't necessary cover whole tokens, ...
l4m2's user avatar
  • 25.3k
17 votes
14 answers
2k views

Simulate Text Cursor

You are given a string [A-Za-z|]+ that contains exactly one occurrence of | denoting the current position of the cursor and a ...
z..'s user avatar
  • 1,081
7 votes
9 answers
1k views

Braille-based Base64

Make a one-to-one map from the base64 character table(0-9a-zA-Z+/) to Braille(U+2800-U+283F). These characters are fixed map for compatibility. For other characters(aka. A-Z and +) you can map any ...
l4m2's user avatar
  • 25.3k
1 vote
0 answers
179 views

Shortest way to cause a seg fault at 0x9c?

In honour of CrowdStrike's exception at 0x9c, what's the shortest way (character-wise) to cause a segfault by dereferencing address 0x9c? The best I can come up with is: ...
0x9c's user avatar
  • 39
7 votes
6 answers
514 views
+50

Compute Dickman

Input A floating point number \$x\$ between 1 and 8 inclusive. Output The Dickman function of \$x\$. The Dickman–de Bruijn function \$\rho(u)\$ is a continuous function that satisfies the delay ...
Simd's user avatar
  • 3,124
3 votes
18 answers
347 views

Check if two lists are permutations of each other [duplicate]

Challenge Given two lists of equal length, find if one of them is a permutation of the other. Output truthy or falsy values, or 1 or 0. Test case Examples ...
Andy Liu's user avatar
  • 121
13 votes
15 answers
931 views

Reorder for smallest largest prefix sum

Given a multiset of integers, order them such that the largest absolute prefix sum $$\max_i \left| \sum_{k<i} a_k \right|$$ is smallest. Output any solution if multiple exist. You can assume input ...
l4m2's user avatar
  • 25.3k
18 votes
21 answers
5k views

Wait, ASCII was 128 characters all along?

Challenge In this challenge, you have to take a nonnegative integer as input, convert it into base-128 bytes (0 → 0x00, 127 → ...
squareroot12621's user avatar
23 votes
16 answers
2k views

Sorting with a deque

You're given an array of positive integers. Your job is to sort them using an initially empty deque (double-ended queue) by the following procedure: Take a number from the front of the array, and ...
Bubbler's user avatar
  • 77.8k
-4 votes
1 answer
83 views

Calling functions and addressing arrays without operators [closed]

Is there a language where they write just ai for a[i] and sqrt2 for sqrt(2). I mean that arrays are treated like functions and calling a function does not need an operator.
Марат Рамазанов's user avatar

15 30 50 per page
1
2 3 4 5
942