All Questions
2,119
questions
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 ...
26
votes
39
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
239
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
590
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
814
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' ...
14
votes
5
answers
1k
views
Decode a Caesar ciphertext with high probability
Caesar ciphers
A Caesar cipher with shift=N is the process of replacing any alphabetic character in a string with the letter which is N positions ahead in the alphabet (wrapping back at the beginning)....
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
22
answers
2k
views
Decode Caesar cipher based on a given text
I can't think of a better name. This is similar to this challenge, but a lot easier.
Read three strings which contain only uppercase letters. The length of the first and second strings are the same. ...
0
votes
1
answer
280
views
How can I reduce the characters in the following python code? [closed]
The following code is 47 characters.
print(("Ekki v","V")["COV"in input()]+"eikur!")
How can it be reduced to 46 or less?
I ...
12
votes
3
answers
1k
views
HTML Table Parser
Input a strict subset of HTML <table> string representation as defined below. Output parsed table, while any cells who span multiple rows or columns, record ...
6
votes
10
answers
980
views
Divisibility patterns
Your inputs are a string and an integer. Your output is the 2d matrix of strings achieved from adding 0 to N spaces between each ...