Skip to main content
Commonmark migration
Source Link

#05AB1E, 6 5 2 bytes

05AB1E, 6 5 2 bytes

ιË 

Input as a list of characters.

-3 bytes by porting @Shaggy's Japt answer, so make sure to upvote him!

Try it online or verify a few more test cases.

Explanation:

ι # Uninterleave the (implicit) input-list of characters # i.e. ["t","t","t","t","e","e","s","s","t","t","!","!","!"] # → [["t","t","e","s","t","!","!"],["t","t","e","s","t","!"]] Ë # Check if both inner lists are equal # → 0 (falsey) # (after which the result is output implicitly) 

#05AB1E, 6 5 2 bytes

ιË 

Input as a list of characters.

-3 bytes by porting @Shaggy's Japt answer, so make sure to upvote him!

Try it online or verify a few more test cases.

Explanation:

ι # Uninterleave the (implicit) input-list of characters # i.e. ["t","t","t","t","e","e","s","s","t","t","!","!","!"] # → [["t","t","e","s","t","!","!"],["t","t","e","s","t","!"]] Ë # Check if both inner lists are equal # → 0 (falsey) # (after which the result is output implicitly) 

05AB1E, 6 5 2 bytes

ιË 

Input as a list of characters.

-3 bytes by porting @Shaggy's Japt answer, so make sure to upvote him!

Try it online or verify a few more test cases.

Explanation:

ι # Uninterleave the (implicit) input-list of characters # i.e. ["t","t","t","t","e","e","s","s","t","t","!","!","!"] # → [["t","t","e","s","t","!","!"],["t","t","e","s","t","!"]] Ë # Check if both inner lists are equal # → 0 (falsey) # (after which the result is output implicitly) 
added 1 character in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

#05AB1E, 6 5 2 bytes

ιË 

Input as a list of characters.

-3 bytes by porting @Saggy's@Shaggy's Japt answer, so make sure to upvote him!

Try it online or verify a few more test cases.

Explanation:

ι # Uninterleave the (implicit) input-list of characters # i.e. ["t","t","t","t","e","e","s","s","t","t","!","!","!"] # → [["t","t","e","s","t","!","!"],["t","t","e","s","t","!"]] Ë # Check if both inner lists are equal # → 0 (falsey) # (after which the result is output implicitly) 

#05AB1E, 6 5 2 bytes

ιË 

Input as a list of characters.

-3 bytes by porting @Saggy's Japt answer, so make sure to upvote him!

Try it online or verify a few more test cases.

Explanation:

ι # Uninterleave the (implicit) input-list of characters # i.e. ["t","t","t","t","e","e","s","s","t","t","!","!","!"] # → [["t","t","e","s","t","!","!"],["t","t","e","s","t","!"]] Ë # Check if both inner lists are equal # → 0 (falsey) # (after which the result is output implicitly) 

#05AB1E, 6 5 2 bytes

ιË 

Input as a list of characters.

-3 bytes by porting @Shaggy's Japt answer, so make sure to upvote him!

Try it online or verify a few more test cases.

Explanation:

ι # Uninterleave the (implicit) input-list of characters # i.e. ["t","t","t","t","e","e","s","s","t","t","!","!","!"] # → [["t","t","e","s","t","!","!"],["t","t","e","s","t","!"]] Ë # Check if both inner lists are equal # → 0 (falsey) # (after which the result is output implicitly) 
deleted 1189 characters in body
Source Link
Kevin Cruijssen
  • 136.3k
  • 14
  • 155
  • 394

#05AB1E (legacy), 56 5 2 bytes

2ô¶ζËιË 

Only works in the legacy, because zip/transpose works on strings, whereas with the new versionInput as a list of 05AB1E and explicit S (split to characters) and J (join to string) are required.

Try it online or-3 bytes by porting verify a few more test cases.

#05AB1E@Saggy's Japt answer, 9 6 bytesso make sure to upvote him!

γ€g2ÖP 

Try it onlineTry it online or verify a few more test casesverify a few more test cases.

Explanation:

ι # SplitUninterleave the (implicit) input into parts-list of size 2characters   # i.e. "tttteesstt!!!" → ["tt"["t","tt""t","ee""t","ss""t","tt""e","e","s","s","t","t","!!","!"] ¶ζ # Zip/transpose; swapping rows/columns, with a newline character as filler # → ["ttest!!","ttest"!\n"] Ë # Check if both strings are equal # → 0 (falsey) # (after which the result is output implicitly) γ # Split the (implicit) input into parts where equal characters are grouped together"]   # i.e. "tttteesstt!!!" ["tttt"[["t","ee""t","ss""e","tt""s","t","!!","!"] €g # Get the length of each part # → [4,2,2,2["t",3] 2Ö # Check for each if it's divisible by 2 # → [1"t",1"e",1"s",1"t",0]"!"]]   PË # And take the productCheck toif checkboth ifinner alllists are truthyequal   # → 0 (falsey)   # (after which the result is output implicitly) 

#05AB1E (legacy), 5 bytes

2ô¶ζË 

Only works in the legacy, because zip/transpose works on strings, whereas with the new version of 05AB1E and explicit S (split to characters) and J (join to string) are required.

Try it online or verify a few more test cases.

#05AB1E, 9 6 bytes

γ€g2ÖP 

Try it online or verify a few more test cases.

Explanation:

 # Split the (implicit) input into parts of size 2   # i.e. "tttteesstt!!!" → ["tt","tt","ee","ss","tt","!!","!"] ¶ζ # Zip/transpose; swapping rows/columns, with a newline character as filler # → ["ttest!!","ttest!\n"] Ë # Check if both strings are equal # → 0 (falsey) # (after which the result is output implicitly) γ # Split the (implicit) input into parts where equal characters are grouped together   # i.e. "tttteesstt!!!" ["tttt","ee","ss","tt","!!!"] €g # Get the length of each part # → [4,2,2,2,3] 2Ö # Check for each if it's divisible by 2 # → [1,1,1,1,0]   P # And take the product to check if all are truthy   # → 0 (falsey)   # (after which the result is output implicitly) 

#05AB1E, 6 5 2 bytes

ιË 

Input as a list of characters.

-3 bytes by porting @Saggy's Japt answer, so make sure to upvote him!

Try it online or verify a few more test cases.

Explanation:

ι # Uninterleave the (implicit) input-list of characters # i.e. ["t","t","t","t","e","e","s","s","t","t","!","!","!"] # → [["t","t","e","s","t","!","!"],["t","t","e","s","t","!"]] Ë # Check if both inner lists are equal # → 0 (falsey) # (after which the result is output implicitly) 
added 546 characters in body
Source Link
Kevin Cruijssen
  • 136.3k
  • 14
  • 155
  • 394
Loading
added 546 characters in body
Source Link
Kevin Cruijssen
  • 136.3k
  • 14
  • 155
  • 394
Loading
Source Link
Kevin Cruijssen
  • 136.3k
  • 14
  • 155
  • 394
Loading