Is this string a palindrome (in Morse Code)?
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
Challenge
Inspired by this video
As you may know, a palindrome is a word that is spelled the same forward as it is backward. The word "PULP" is not a palindrome, but when translated into Morse Code (with the spacing between letters removed), "PULP" becomes ".--...-.-...--." which is a palindrome. Your task is to write a program or function which takes a string and returns whether that word is a palindrome in International Morse Code.
A: .-
B: -...
C: -.-.
D: -..
E: .
F: ..-.
G: --.
H: ....
I: ..
J: .---
K: -.-
L: .-..
M: --
N: -.
O: ---
P: .--.
Q: --.-
R: .-.
S: ...
T: -
U: ..-
V: ...-
W: .--
X: -..-
Y: -.--
Z: --..
Rules
Input
Input can be taken in any reasonable format. The input string will contain only letters in any case you prefer. The string will not contain spaces, numbers, or punctuation.
Output
Your program should output 1 of 2 constant distinct results based on whether the input is a palindrome, e.g. True/False, 1/0, HOTDOG/NOTHOTDOG
Scoring
This is code-golf so shortest answer in bytes wins. Standard loopholes are forbidden.
Test Cases
Input => Output
"PULP" => True
"RESEARCHER" => True
"HOTDOGS" => True
"" => True
"A" => False
"RACECAR" => False
"PROGRAMMING"=> False
"PUZZLES" => False
code-golf decision-problem
add a comment |Â
up vote
4
down vote
favorite
Challenge
Inspired by this video
As you may know, a palindrome is a word that is spelled the same forward as it is backward. The word "PULP" is not a palindrome, but when translated into Morse Code (with the spacing between letters removed), "PULP" becomes ".--...-.-...--." which is a palindrome. Your task is to write a program or function which takes a string and returns whether that word is a palindrome in International Morse Code.
A: .-
B: -...
C: -.-.
D: -..
E: .
F: ..-.
G: --.
H: ....
I: ..
J: .---
K: -.-
L: .-..
M: --
N: -.
O: ---
P: .--.
Q: --.-
R: .-.
S: ...
T: -
U: ..-
V: ...-
W: .--
X: -..-
Y: -.--
Z: --..
Rules
Input
Input can be taken in any reasonable format. The input string will contain only letters in any case you prefer. The string will not contain spaces, numbers, or punctuation.
Output
Your program should output 1 of 2 constant distinct results based on whether the input is a palindrome, e.g. True/False, 1/0, HOTDOG/NOTHOTDOG
Scoring
This is code-golf so shortest answer in bytes wins. Standard loopholes are forbidden.
Test Cases
Input => Output
"PULP" => True
"RESEARCHER" => True
"HOTDOGS" => True
"" => True
"A" => False
"RACECAR" => False
"PROGRAMMING"=> False
"PUZZLES" => False
code-golf decision-problem
related
â Luis felipe De jesus Munoz
2 hours ago
Only my vote is a hammer, I'd VTC this as a dupe of the challenge Luis linked; the bulk of most solutions is going to be converting the input to Morse code.
â Shaggy
2 hours ago
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
Challenge
Inspired by this video
As you may know, a palindrome is a word that is spelled the same forward as it is backward. The word "PULP" is not a palindrome, but when translated into Morse Code (with the spacing between letters removed), "PULP" becomes ".--...-.-...--." which is a palindrome. Your task is to write a program or function which takes a string and returns whether that word is a palindrome in International Morse Code.
A: .-
B: -...
C: -.-.
D: -..
E: .
F: ..-.
G: --.
H: ....
I: ..
J: .---
K: -.-
L: .-..
M: --
N: -.
O: ---
P: .--.
Q: --.-
R: .-.
S: ...
T: -
U: ..-
V: ...-
W: .--
X: -..-
Y: -.--
Z: --..
Rules
Input
Input can be taken in any reasonable format. The input string will contain only letters in any case you prefer. The string will not contain spaces, numbers, or punctuation.
Output
Your program should output 1 of 2 constant distinct results based on whether the input is a palindrome, e.g. True/False, 1/0, HOTDOG/NOTHOTDOG
Scoring
This is code-golf so shortest answer in bytes wins. Standard loopholes are forbidden.
Test Cases
Input => Output
"PULP" => True
"RESEARCHER" => True
"HOTDOGS" => True
"" => True
"A" => False
"RACECAR" => False
"PROGRAMMING"=> False
"PUZZLES" => False
code-golf decision-problem
Challenge
Inspired by this video
As you may know, a palindrome is a word that is spelled the same forward as it is backward. The word "PULP" is not a palindrome, but when translated into Morse Code (with the spacing between letters removed), "PULP" becomes ".--...-.-...--." which is a palindrome. Your task is to write a program or function which takes a string and returns whether that word is a palindrome in International Morse Code.
A: .-
B: -...
C: -.-.
D: -..
E: .
F: ..-.
G: --.
H: ....
I: ..
J: .---
K: -.-
L: .-..
M: --
N: -.
O: ---
P: .--.
Q: --.-
R: .-.
S: ...
T: -
U: ..-
V: ...-
W: .--
X: -..-
Y: -.--
Z: --..
Rules
Input
Input can be taken in any reasonable format. The input string will contain only letters in any case you prefer. The string will not contain spaces, numbers, or punctuation.
Output
Your program should output 1 of 2 constant distinct results based on whether the input is a palindrome, e.g. True/False, 1/0, HOTDOG/NOTHOTDOG
Scoring
This is code-golf so shortest answer in bytes wins. Standard loopholes are forbidden.
Test Cases
Input => Output
"PULP" => True
"RESEARCHER" => True
"HOTDOGS" => True
"" => True
"A" => False
"RACECAR" => False
"PROGRAMMING"=> False
"PUZZLES" => False
code-golf decision-problem
code-golf decision-problem
edited 1 hour ago
asked 2 hours ago
Cowabunghole
643315
643315
related
â Luis felipe De jesus Munoz
2 hours ago
Only my vote is a hammer, I'd VTC this as a dupe of the challenge Luis linked; the bulk of most solutions is going to be converting the input to Morse code.
â Shaggy
2 hours ago
add a comment |Â
related
â Luis felipe De jesus Munoz
2 hours ago
Only my vote is a hammer, I'd VTC this as a dupe of the challenge Luis linked; the bulk of most solutions is going to be converting the input to Morse code.
â Shaggy
2 hours ago
related
â Luis felipe De jesus Munoz
2 hours ago
related
â Luis felipe De jesus Munoz
2 hours ago
Only my vote is a hammer, I'd VTC this as a dupe of the challenge Luis linked; the bulk of most solutions is going to be converting the input to Morse code.
â Shaggy
2 hours ago
Only my vote is a hammer, I'd VTC this as a dupe of the challenge Luis linked; the bulk of most solutions is going to be converting the input to Morse code.
â Shaggy
2 hours ago
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
1
down vote
MBASIC, 325 bytes
First attempt, before the big guns get here :-)
1 DATA .-,-...,-.-.,-..,.,..-.,--.,....,..,.---,-.-,.-..,--,-.,---,.--.,--.-,.-.,...,-,..-,...-,.--,-..-,-.--,--..
2 DIM C$(26):FOR I=1 TO 26:READ C$(I):NEXT:INPUT T$:FOR I=1 TO LEN(T$):N=ASC(MID$(T$,I,1))-64:S$=S$+C$(N):NEXT:L=LEN(S$):FOR I=1 TO L:IF MID$(S$,I,1)<>MID$(S$,(L+1)-I,1) THEN 4
3 NEXT:PRINT"True":END
4 PRINT"False
Output
? PULP
True
? RESEARCHER
True
? HOTDOGS
True
?
True
? A
False
? RACECAR
False
? PROGRAMMING
False
? PUZZLES
False
add a comment |Â
up vote
1
down vote
Jelly, 35 bytes
ÃÂẠḣ29âÂÂÃ
Â}â±®EcÃÂâ±®ÃÂeáºÂâ»á»Âá¸ÂâÂÂÃ
Â?iâ±®â¸dâ´Bnâ±®/â¬FÃ
Âá¸Â
Takes input in uppercase only; output is 1
for true, 0
for false.
Try it online! Or see the test-suite.
How?
ÃÂẠḣ29âÂÂ...âÂÂÃ
Â?iâ±®â¸dâ´Bnâ±®/â¬FÃ
ÂḠ- Link: list of characters (in [A-Z] only), S
ÃÂẠ- alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
ḣ29 - head to index 29 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabc'
âÂÂ...â - base 250 literal = 1222276956185766767980461920692
Ã
Â? - permutation at index = 'EAIWRUSJPaLbFVHcTNMDKGOBXCYZQ'
⸠- chain's left argument = S e.g. 'FOOL'
â±® - map with:
i - first index of (char in 'EAI...') [13,23,23,11]
â´ - literal 16 16
d - divmod [[0,13],[1,7],[1,7],[0,11]]
B - to binary (vectorises) [[[0],[1,1,0,1]],[[1],[1,1,1]],[[1],[1,1,1]],[[0],[1,0,1,1]]]
⬠- for each:
/ - reduce by:
â±® - map with:
n - not equal [[1,1,0,1],[0,0,0],[0,0,0],[1,0,1,1]]
F - flatten [1,1,0,1,0,0,0,0,0,0,1,0,1,1]
Ã
ÂḠ- is palindromic? 1
add a comment |Â
up vote
0
down vote
Pyth, 35 33 bytes
The code contains unprintable characters, so here's a hexdump.
00000000: 5f49 7358 7a47 632e 2207 0901 3f08 82ee _IsXzGc."...?...
00000010: bd3f c256 9d54 c381 7dac 6590 37d3 c8f5 .?.V.T..}.e.7...
00000020: 52 R
Try it online. Test suite.
Explanation
Starting from ."
the end of the code generates the Morse alphabet, with dots as x08
and dashes as x07
, and separated by tabs.
c
splits the string by the tabs.
XzG
translates (X
) the input (z
) from the alphabet (G
) to this "Morse alphabet".
s
sums (joins) the Morse symbols together. For empty inputs, returns 0, but this is not a problem.
_I
checks if the result does not change (I
) when reversed (_
). For empty input, checks if 0 does not change when negated.
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
MBASIC, 325 bytes
First attempt, before the big guns get here :-)
1 DATA .-,-...,-.-.,-..,.,..-.,--.,....,..,.---,-.-,.-..,--,-.,---,.--.,--.-,.-.,...,-,..-,...-,.--,-..-,-.--,--..
2 DIM C$(26):FOR I=1 TO 26:READ C$(I):NEXT:INPUT T$:FOR I=1 TO LEN(T$):N=ASC(MID$(T$,I,1))-64:S$=S$+C$(N):NEXT:L=LEN(S$):FOR I=1 TO L:IF MID$(S$,I,1)<>MID$(S$,(L+1)-I,1) THEN 4
3 NEXT:PRINT"True":END
4 PRINT"False
Output
? PULP
True
? RESEARCHER
True
? HOTDOGS
True
?
True
? A
False
? RACECAR
False
? PROGRAMMING
False
? PUZZLES
False
add a comment |Â
up vote
1
down vote
MBASIC, 325 bytes
First attempt, before the big guns get here :-)
1 DATA .-,-...,-.-.,-..,.,..-.,--.,....,..,.---,-.-,.-..,--,-.,---,.--.,--.-,.-.,...,-,..-,...-,.--,-..-,-.--,--..
2 DIM C$(26):FOR I=1 TO 26:READ C$(I):NEXT:INPUT T$:FOR I=1 TO LEN(T$):N=ASC(MID$(T$,I,1))-64:S$=S$+C$(N):NEXT:L=LEN(S$):FOR I=1 TO L:IF MID$(S$,I,1)<>MID$(S$,(L+1)-I,1) THEN 4
3 NEXT:PRINT"True":END
4 PRINT"False
Output
? PULP
True
? RESEARCHER
True
? HOTDOGS
True
?
True
? A
False
? RACECAR
False
? PROGRAMMING
False
? PUZZLES
False
add a comment |Â
up vote
1
down vote
up vote
1
down vote
MBASIC, 325 bytes
First attempt, before the big guns get here :-)
1 DATA .-,-...,-.-.,-..,.,..-.,--.,....,..,.---,-.-,.-..,--,-.,---,.--.,--.-,.-.,...,-,..-,...-,.--,-..-,-.--,--..
2 DIM C$(26):FOR I=1 TO 26:READ C$(I):NEXT:INPUT T$:FOR I=1 TO LEN(T$):N=ASC(MID$(T$,I,1))-64:S$=S$+C$(N):NEXT:L=LEN(S$):FOR I=1 TO L:IF MID$(S$,I,1)<>MID$(S$,(L+1)-I,1) THEN 4
3 NEXT:PRINT"True":END
4 PRINT"False
Output
? PULP
True
? RESEARCHER
True
? HOTDOGS
True
?
True
? A
False
? RACECAR
False
? PROGRAMMING
False
? PUZZLES
False
MBASIC, 325 bytes
First attempt, before the big guns get here :-)
1 DATA .-,-...,-.-.,-..,.,..-.,--.,....,..,.---,-.-,.-..,--,-.,---,.--.,--.-,.-.,...,-,..-,...-,.--,-..-,-.--,--..
2 DIM C$(26):FOR I=1 TO 26:READ C$(I):NEXT:INPUT T$:FOR I=1 TO LEN(T$):N=ASC(MID$(T$,I,1))-64:S$=S$+C$(N):NEXT:L=LEN(S$):FOR I=1 TO L:IF MID$(S$,I,1)<>MID$(S$,(L+1)-I,1) THEN 4
3 NEXT:PRINT"True":END
4 PRINT"False
Output
? PULP
True
? RESEARCHER
True
? HOTDOGS
True
?
True
? A
False
? RACECAR
False
? PROGRAMMING
False
? PUZZLES
False
answered 1 hour ago
wooshinyobject
915
915
add a comment |Â
add a comment |Â
up vote
1
down vote
Jelly, 35 bytes
ÃÂẠḣ29âÂÂÃ
Â}â±®EcÃÂâ±®ÃÂeáºÂâ»á»Âá¸ÂâÂÂÃ
Â?iâ±®â¸dâ´Bnâ±®/â¬FÃ
Âá¸Â
Takes input in uppercase only; output is 1
for true, 0
for false.
Try it online! Or see the test-suite.
How?
ÃÂẠḣ29âÂÂ...âÂÂÃ
Â?iâ±®â¸dâ´Bnâ±®/â¬FÃ
ÂḠ- Link: list of characters (in [A-Z] only), S
ÃÂẠ- alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
ḣ29 - head to index 29 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabc'
âÂÂ...â - base 250 literal = 1222276956185766767980461920692
Ã
Â? - permutation at index = 'EAIWRUSJPaLbFVHcTNMDKGOBXCYZQ'
⸠- chain's left argument = S e.g. 'FOOL'
â±® - map with:
i - first index of (char in 'EAI...') [13,23,23,11]
â´ - literal 16 16
d - divmod [[0,13],[1,7],[1,7],[0,11]]
B - to binary (vectorises) [[[0],[1,1,0,1]],[[1],[1,1,1]],[[1],[1,1,1]],[[0],[1,0,1,1]]]
⬠- for each:
/ - reduce by:
â±® - map with:
n - not equal [[1,1,0,1],[0,0,0],[0,0,0],[1,0,1,1]]
F - flatten [1,1,0,1,0,0,0,0,0,0,1,0,1,1]
Ã
ÂḠ- is palindromic? 1
add a comment |Â
up vote
1
down vote
Jelly, 35 bytes
ÃÂẠḣ29âÂÂÃ
Â}â±®EcÃÂâ±®ÃÂeáºÂâ»á»Âá¸ÂâÂÂÃ
Â?iâ±®â¸dâ´Bnâ±®/â¬FÃ
Âá¸Â
Takes input in uppercase only; output is 1
for true, 0
for false.
Try it online! Or see the test-suite.
How?
ÃÂẠḣ29âÂÂ...âÂÂÃ
Â?iâ±®â¸dâ´Bnâ±®/â¬FÃ
ÂḠ- Link: list of characters (in [A-Z] only), S
ÃÂẠ- alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
ḣ29 - head to index 29 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabc'
âÂÂ...â - base 250 literal = 1222276956185766767980461920692
Ã
Â? - permutation at index = 'EAIWRUSJPaLbFVHcTNMDKGOBXCYZQ'
⸠- chain's left argument = S e.g. 'FOOL'
â±® - map with:
i - first index of (char in 'EAI...') [13,23,23,11]
â´ - literal 16 16
d - divmod [[0,13],[1,7],[1,7],[0,11]]
B - to binary (vectorises) [[[0],[1,1,0,1]],[[1],[1,1,1]],[[1],[1,1,1]],[[0],[1,0,1,1]]]
⬠- for each:
/ - reduce by:
â±® - map with:
n - not equal [[1,1,0,1],[0,0,0],[0,0,0],[1,0,1,1]]
F - flatten [1,1,0,1,0,0,0,0,0,0,1,0,1,1]
Ã
ÂḠ- is palindromic? 1
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Jelly, 35 bytes
ÃÂẠḣ29âÂÂÃ
Â}â±®EcÃÂâ±®ÃÂeáºÂâ»á»Âá¸ÂâÂÂÃ
Â?iâ±®â¸dâ´Bnâ±®/â¬FÃ
Âá¸Â
Takes input in uppercase only; output is 1
for true, 0
for false.
Try it online! Or see the test-suite.
How?
ÃÂẠḣ29âÂÂ...âÂÂÃ
Â?iâ±®â¸dâ´Bnâ±®/â¬FÃ
ÂḠ- Link: list of characters (in [A-Z] only), S
ÃÂẠ- alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
ḣ29 - head to index 29 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabc'
âÂÂ...â - base 250 literal = 1222276956185766767980461920692
Ã
Â? - permutation at index = 'EAIWRUSJPaLbFVHcTNMDKGOBXCYZQ'
⸠- chain's left argument = S e.g. 'FOOL'
â±® - map with:
i - first index of (char in 'EAI...') [13,23,23,11]
â´ - literal 16 16
d - divmod [[0,13],[1,7],[1,7],[0,11]]
B - to binary (vectorises) [[[0],[1,1,0,1]],[[1],[1,1,1]],[[1],[1,1,1]],[[0],[1,0,1,1]]]
⬠- for each:
/ - reduce by:
â±® - map with:
n - not equal [[1,1,0,1],[0,0,0],[0,0,0],[1,0,1,1]]
F - flatten [1,1,0,1,0,0,0,0,0,0,1,0,1,1]
Ã
ÂḠ- is palindromic? 1
Jelly, 35 bytes
ÃÂẠḣ29âÂÂÃ
Â}â±®EcÃÂâ±®ÃÂeáºÂâ»á»Âá¸ÂâÂÂÃ
Â?iâ±®â¸dâ´Bnâ±®/â¬FÃ
Âá¸Â
Takes input in uppercase only; output is 1
for true, 0
for false.
Try it online! Or see the test-suite.
How?
ÃÂẠḣ29âÂÂ...âÂÂÃ
Â?iâ±®â¸dâ´Bnâ±®/â¬FÃ
ÂḠ- Link: list of characters (in [A-Z] only), S
ÃÂẠ- alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
ḣ29 - head to index 29 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabc'
âÂÂ...â - base 250 literal = 1222276956185766767980461920692
Ã
Â? - permutation at index = 'EAIWRUSJPaLbFVHcTNMDKGOBXCYZQ'
⸠- chain's left argument = S e.g. 'FOOL'
â±® - map with:
i - first index of (char in 'EAI...') [13,23,23,11]
â´ - literal 16 16
d - divmod [[0,13],[1,7],[1,7],[0,11]]
B - to binary (vectorises) [[[0],[1,1,0,1]],[[1],[1,1,1]],[[1],[1,1,1]],[[0],[1,0,1,1]]]
⬠- for each:
/ - reduce by:
â±® - map with:
n - not equal [[1,1,0,1],[0,0,0],[0,0,0],[1,0,1,1]]
F - flatten [1,1,0,1,0,0,0,0,0,0,1,0,1,1]
Ã
ÂḠ- is palindromic? 1
answered 16 mins ago
Jonathan Allan
49.2k534161
49.2k534161
add a comment |Â
add a comment |Â
up vote
0
down vote
Pyth, 35 33 bytes
The code contains unprintable characters, so here's a hexdump.
00000000: 5f49 7358 7a47 632e 2207 0901 3f08 82ee _IsXzGc."...?...
00000010: bd3f c256 9d54 c381 7dac 6590 37d3 c8f5 .?.V.T..}.e.7...
00000020: 52 R
Try it online. Test suite.
Explanation
Starting from ."
the end of the code generates the Morse alphabet, with dots as x08
and dashes as x07
, and separated by tabs.
c
splits the string by the tabs.
XzG
translates (X
) the input (z
) from the alphabet (G
) to this "Morse alphabet".
s
sums (joins) the Morse symbols together. For empty inputs, returns 0, but this is not a problem.
_I
checks if the result does not change (I
) when reversed (_
). For empty input, checks if 0 does not change when negated.
add a comment |Â
up vote
0
down vote
Pyth, 35 33 bytes
The code contains unprintable characters, so here's a hexdump.
00000000: 5f49 7358 7a47 632e 2207 0901 3f08 82ee _IsXzGc."...?...
00000010: bd3f c256 9d54 c381 7dac 6590 37d3 c8f5 .?.V.T..}.e.7...
00000020: 52 R
Try it online. Test suite.
Explanation
Starting from ."
the end of the code generates the Morse alphabet, with dots as x08
and dashes as x07
, and separated by tabs.
c
splits the string by the tabs.
XzG
translates (X
) the input (z
) from the alphabet (G
) to this "Morse alphabet".
s
sums (joins) the Morse symbols together. For empty inputs, returns 0, but this is not a problem.
_I
checks if the result does not change (I
) when reversed (_
). For empty input, checks if 0 does not change when negated.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Pyth, 35 33 bytes
The code contains unprintable characters, so here's a hexdump.
00000000: 5f49 7358 7a47 632e 2207 0901 3f08 82ee _IsXzGc."...?...
00000010: bd3f c256 9d54 c381 7dac 6590 37d3 c8f5 .?.V.T..}.e.7...
00000020: 52 R
Try it online. Test suite.
Explanation
Starting from ."
the end of the code generates the Morse alphabet, with dots as x08
and dashes as x07
, and separated by tabs.
c
splits the string by the tabs.
XzG
translates (X
) the input (z
) from the alphabet (G
) to this "Morse alphabet".
s
sums (joins) the Morse symbols together. For empty inputs, returns 0, but this is not a problem.
_I
checks if the result does not change (I
) when reversed (_
). For empty input, checks if 0 does not change when negated.
Pyth, 35 33 bytes
The code contains unprintable characters, so here's a hexdump.
00000000: 5f49 7358 7a47 632e 2207 0901 3f08 82ee _IsXzGc."...?...
00000010: bd3f c256 9d54 c381 7dac 6590 37d3 c8f5 .?.V.T..}.e.7...
00000020: 52 R
Try it online. Test suite.
Explanation
Starting from ."
the end of the code generates the Morse alphabet, with dots as x08
and dashes as x07
, and separated by tabs.
c
splits the string by the tabs.
XzG
translates (X
) the input (z
) from the alphabet (G
) to this "Morse alphabet".
s
sums (joins) the Morse symbols together. For empty inputs, returns 0, but this is not a problem.
_I
checks if the result does not change (I
) when reversed (_
). For empty input, checks if 0 does not change when negated.
edited 16 mins ago
answered 1 hour ago
Pietu1998
15.3k22680
15.3k22680
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f174319%2fis-this-string-a-palindrome-in-morse-code%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
related
â Luis felipe De jesus Munoz
2 hours ago
Only my vote is a hammer, I'd VTC this as a dupe of the challenge Luis linked; the bulk of most solutions is going to be converting the input to Morse code.
â Shaggy
2 hours ago