Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
A competition to solve a particular problem through the usage and manipulation of strings.
2
votes
Find patterns in numbers based on the similarity of characters?
Python 2, 48 46 bytes
Saved two bytes thanks to @ovs!
s=set(''.join(l))
while s:s&=set(l[input()-1])
Try it online!
Renamed numbers to l. If that's not okay then add 10 bytes for l=numbers.
0
votes
Output a text that doesn't output any of the characters used in the instructions to output t...
Python 2, 14 bytes, score 27672892.1429
print"\n"*9**9
Prints 387420490 newlines. Output truncated on TIO.
Try it online!
0
votes
Sequence splitting
Scala, 20 bytes
_.replace("A","\nA")
Try it online!
(Not sure if putting the types in the header is allowed, I'll change it if not.)
1
vote
Sequence splitting
Standard ML (MLton), 40 bytes
String.translate(fn#"A"=>"\nA"|x=>str x)
Try it online!
Unfortunate that String.translate is so long...
1
vote
Enklactify these strings
Returns False if no valid enklaction string exists.
Try it online! …
3
votes
Who committed most?
Bash, 20 bytes
head -1|cut -d\( -f1
Try it online!
26
votes
38
answers
2k
views
Divide a string
Challenge
Given a string and a number, divide the string into that many equal-sized parts. … For example, if the number is 3, you should divide the string into 3 pieces no matter how long the string is. …
13
votes
4
answers
456
views
Read a password: on mobile!
Challenge
Read a string from the keyboard.
Each time a characterk is entered, display it for a short time interval. …
1
vote
Does the start equal the end?
Standard ML - 52 54 bytes
open String
fn s=>s<>""andalso sub(s,0)=sub(s,size s-1) …
0
votes
Count the number of "e"s in a string without using the letter "e"
Scala, 20 bytes
_.count(_=='\u0065')
Try it online!
2
votes
Isogram checker
Python 3, 46 bytes
lambda s:s.isalpha()*len(s)==len({*s.lower()})
Try it online!
13
votes
3
answers
347
views
Quote my quote!
Challenge
Given a string as input, output a quotable version of that string by exchanging double- and single-quotation marks that are used for inner quotation. …
56
votes
17
answers
3k
views
"99 bottles of fizz"
Challenge
Write a program that outputs the lyrics to 99 Bottles of Beer, but instead of "beer", output "fizz" if the number of bottles on the wall is a multiple of 3, "buzz" if it is a multiple of 5, …
2
votes
Is there an unmatched parenthesis in this String?
Python 2, 61 bytes
Saved 4 bytes thanks to WheatWizard!
lambda s:any(s.count(i)^s.count(j)for i,j in['{}','[]','()'])
Try it online!
3
votes
Print a shuffled deck of cards
Python 3, 107 bytes
Saved 6 bytes thanks to @totallyhuman and 3 thanks to @CCB60!
from random import*
print(*sample([chr(int('1F0'+a+b,16))for a in'ABCD'for b in'123456789ABDE'],52),sep='')
Try …