All Questions
2,126
questions
6
votes
2
answers
295
views
Snake a string through a simplex
An n-simplex is a generalization of 'triangleness' in any dimension (specifically, it is the simplest shape requiring n dimensions). Starting with 0 dimensions, the named simplexes are: point, line ...
-1
votes
1
answer
61
views
Function to Convert string to Hexadecimal [duplicate]
Assignment:
Create a function that can convert a string to its encoded hexadecimal value.
In your answer, also show how to run this function (to validate answers).
Your function must return OR print ...
7
votes
8
answers
558
views
Curry a C function pointer [closed]
Objective
Given a type signature of a C function pointer represented as a string, output the (fully) curried version of it, also as a string.
I/O format
It is assumed that:
There is at least one ...
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 ...
3
votes
1
answer
194
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 & ...
23
votes
20
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 ...
9
votes
12
answers
3k
views
Keyboard Ping Pong
Keyboard Ping Pong
(This question was inspired by this post.)
Challenge
Given a string of letters, determine if the word "ping-pongs" across the keyboard. (Letters alternating between sides ...
27
votes
41
answers
2k
views
Segments of a string, doubling in length
Simple task today. Given a string whose length is one less than a whole power of 2, divide it into segments with doubling length.
For example for the string ...
1
vote
2
answers
246
views
Write a function that takes an input string and encodes it using a modified Fibonacci sequence in reverse [closed]
Given an input string, first convert each character to its ASCII value.
Generate a reversed Fibonacci sequence of the same length as the input string.
Encode each character by adding its ASCII value ...
19
votes
22
answers
1k
views
Find characters common among all strings
Find characters common among all strings
You are given multiple Strings as an input. Your task is to find the characters that are present in every string, and ...
7
votes
7
answers
604
views
Build the first 6 letters of an Italian codice fiscale (tax identification number)
Given a single string with a person's name and surname, output the first 6 characters of their codice fiscale.
Codice fiscale
Codice fiscale is a 16-character long alphanumeric string that identifies (...
20
votes
30
answers
2k
views
Break a word into vowels and consonants
Objective
Given an string \$n\$, output two strings, namely the string consisting of vowels "a", "e", "i", "o", and "u", and the string consisting of ...
14
votes
8
answers
1k
views
Compare two strings, with NaC
I just thought of this idea: if we have NaN ("not a number") for floats, how about NaC ("not a character") for a single unknown character in a string?
Your input should be two ...
9
votes
14
answers
835
views
Convert CSV tables to MediaWiki tables
Input a CSV table, like this:
data00,data01,data02,...,data0m
data10,data11,data12,...,data1m
...
datan0,datan1,datan2,...,datanm
The cells in the CSV table is ...
21
votes
14
answers
3k
views
Cold Bee and Old Beer
Introduction:
Inspired by this silly meme video, which states 'COLD BEER', but is slightly too large for the scrolling advertisement board, causing it to display either 'COLD BEE' or 'OLD BEER' ...