Skip to main content
Commonmark migration
Source Link

#Mathematica 83 80 68 54 bytes

Mathematica 83 80 68 54 bytes

#&@@@#<>""=="ab"&&Equal@@Length/@#&@*Split@*Characters

Thanks @MartinEnder for shortening it by 26 bytes :)

If input can be a list of characters instead of a string, 39 bytes is possible:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split

eg:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split@{a,b,a,b,a,b}

(*False*)

#Mathematica 83 80 68 54 bytes

#&@@@#<>""=="ab"&&Equal@@Length/@#&@*Split@*Characters

Thanks @MartinEnder for shortening it by 26 bytes :)

If input can be a list of characters instead of a string, 39 bytes is possible:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split

eg:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split@{a,b,a,b,a,b}

(*False*)

Mathematica 83 80 68 54 bytes

#&@@@#<>""=="ab"&&Equal@@Length/@#&@*Split@*Characters

Thanks @MartinEnder for shortening it by 26 bytes :)

If input can be a list of characters instead of a string, 39 bytes is possible:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split

eg:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split@{a,b,a,b,a,b}

(*False*)
I think this was a typo, since it's required and the byte count didn't match
Source Link
Martin Ender
  • 197.2k
  • 67
  • 447
  • 975

#Mathematica 83 80 68 54 bytes

#&@@@#<>""=="ab"&&Equal@@Length/@#&@*Split@Characters@#&@*Split@*Characters

Thanks @MartinEnder for shortening it by 26 bytes :)

If input can be a list of characters instead of a string, 39 bytes is possible:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split

eg:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split@{a,b,a,b,a,b}

(*False*)

#Mathematica 83 80 68 54 bytes

#&@@@#<>""=="ab"&&Equal@@Length/@#&@*Split@Characters

Thanks @MartinEnder for shortening it by 26 bytes :)

If input can be a list of characters instead of a string, 39 bytes is possible:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split

eg:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split@{a,b,a,b,a,b}

(*False*)

#Mathematica 83 80 68 54 bytes

#&@@@#<>""=="ab"&&Equal@@Length/@#&@*Split@*Characters

Thanks @MartinEnder for shortening it by 26 bytes :)

If input can be a list of characters instead of a string, 39 bytes is possible:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split

eg:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split@{a,b,a,b,a,b}

(*False*)
added 217 characters in body
Source Link
martin
  • 1.3k
  • 8
  • 15

#Mathematica 83 80 68 5554 bytes

#&@@@#<>""=="ab"&&Equal@@Length/@#&@Split@Characters@#&@#&@*Split@Characters

Thanks @MartinEnder for shortening it by 2526 bytes :)

If input can be a list of characters instead of a string, 39 bytes is possible:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split

eg:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split@{a,b,a,b,a,b}

(*False*)

#Mathematica 83 80 68 55 bytes

#&@@@#<>""=="ab"&&Equal@@Length/@#&@Split@Characters@#&

Thanks @MartinEnder for shortening it by 25 bytes :)

#Mathematica 83 80 68 54 bytes

#&@@@#<>""=="ab"&&Equal@@Length/@#&@*Split@Characters

Thanks @MartinEnder for shortening it by 26 bytes :)

If input can be a list of characters instead of a string, 39 bytes is possible:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split

eg:

#&@@@#=={a,b}&&Equal@@Length/@#&@*Split@{a,b,a,b,a,b}

(*False*)
deleted 125 characters in body
Source Link
martin
  • 1.3k
  • 8
  • 15
Loading
added 163 characters in body
Source Link
martin
  • 1.3k
  • 8
  • 15
Loading
added 163 characters in body
Source Link
martin
  • 1.3k
  • 8
  • 15
Loading
added 163 characters in body
Source Link
martin
  • 1.3k
  • 8
  • 15
Loading
Post Undeleted by martin
deleted 48 characters in body
Source Link
martin
  • 1.3k
  • 8
  • 15
Loading
Post Deleted by martin
added 10 characters in body
Source Link
martin
  • 1.3k
  • 8
  • 15
Loading
added 87 characters in body
Source Link
martin
  • 1.3k
  • 8
  • 15
Loading
Source Link
martin
  • 1.3k
  • 8
  • 15
Loading