Skip to main content
added 92 characters in body
Source Link
Shieru Asakoto
  • 6.5k
  • 19
  • 44

JavaScript (Node.js), 144 ... 104100 10096 bytes

o=>!(o,a=o.split``.map(i=>o.split(i||eehhhlmmnnnpsti||aeehhhlmmnnnpst)[`length`]-1))=>!a.some(g=>![g>1,,,][[g>1][-!1]||a[-!1]-g) 

Try it online!Try it online!

2525 different characters * 4 times each

24 different characters * 4 times each

o=>!(o, // Input a=o.split``.map( // Split the input into character array and i=>o.split(i||eehhhlmmnnnpsti||aeehhhlmmnnnpst)[`length`]-1  // count the occurrences of each character. )  )=>!a.some(  // Then check g=>![g>1,,,][[g>1][-!1]  // If each character appears at least 2 timestwice ||a[-!1]-g // and the counts are all the same number. ) More to add: 1. Using {s.split``} instead of {[...s]} is to reduce the number of {.} that dominates the    the count. 2. Using {!c.some} instead of {c.every} to reduce the number of inefficient characters (v,r,y in every) 3. Still one unavoidable inefficient character left ({h}). Update: 1. Got rid of one {.} by replacing {.length} by {["length"]}. 2. Got rid of one {=} by replacing {c[-!1]!=g} by {c[-!1]-g}. 3. Got rid of one {()} by replacing {!(g>1)} by {![g>1][-!1]}. 4. Finally, because count per character is now 4, the backslashes can be taken out. Update: 1. Got rid of all {"} by replacing {"length"} by {`length`} and exploiting shortcut evaluation. {aaaeehhhlmmnnnpst} is not defined but is not evaluated either because of {c} which must be evaluated to true. Update: 1. Got rid of all {c} by shortcutting the undefined variable at {split(i)} and replacing all {c} by {a}. Since {i} is never an empty string, it is always evaluated true (except compared directly to true). Update: 1. Got rid of all {,} by moving the assignment after the argument list. The {()} at the front can therefore be moved to the assignment, retaining same number of {()}s. 

JavaScript (Node.js), 144 ... 104 100 bytes

(o,a=o.split``.map(i=>o.split(i||eehhhlmmnnnpst)[`length`]-1))=>!a.some(g=>![g>1,,,][-!1]||a[-!1]-g) 

Try it online!

25 different characters * 4 times each

(o, // Input a=o.split``.map( // Split the input into character array and i=>o.split(i||eehhhlmmnnnpst)[`length`]-1  // count the occurrences of each character. )  )=>!a.some( // Then check g=>![g>1,,,][-!1] // If each character appears at least 2 times ||a[-!1]-g // and the counts are all the same number. ) More to add: 1. Using {s.split``} instead of {[...s]} is to reduce the number of {.} that dominates the  count. 2. Using {!c.some} instead of {c.every} to reduce the number of inefficient characters (v,r,y in every) 3. Still one unavoidable inefficient character left ({h}). Update: 1. Got rid of one {.} by replacing {.length} by {["length"]}. 2. Got rid of one {=} by replacing {c[-!1]!=g} by {c[-!1]-g}. 3. Got rid of one {()} by replacing {!(g>1)} by {![g>1][-!1]}. 4. Finally, because count per character is now 4, the backslashes can be taken out. Update: 1. Got rid of all {"} by replacing {"length"} by {`length`} and exploiting shortcut evaluation. {aaaeehhhlmmnnnpst} is not defined but is not evaluated either because of {c} which must be evaluated to true. Update: 1. Got rid of all {c} by shortcutting the undefined variable at {split(i)} and replacing all {c} by {a}. Since {i} is never an empty string, it is always evaluated true (except compared directly to true). 

JavaScript (Node.js), 144 ... 100 96 bytes

o=>!(a=o.split``.map(i=>o.split(i||aeehhhlmmnnnpst)[`length`]-1)).some(g=>![g>1][-!1]||a[-!1]-g) 

Try it online!

25 different characters * 4 times each

24 different characters * 4 times each

o=>!( a=o.split``.map( // Split the input into character array and i=>o.split(i||aeehhhlmmnnnpst)[`length`]-1 // count the occurrences of each character. ) ).some(  // Then check g=>![g>1][-!1]  // If each character appears at least twice ||a[-!1]-g // and the counts are all the same number. ) More to add: 1. Using {s.split``} instead of {[...s]} is to reduce the number of {.} that dominates   the count. 2. Using {!c.some} instead of {c.every} to reduce the number of inefficient characters (v,r,y in every) 3. Still one unavoidable inefficient character left ({h}). Update: 1. Got rid of one {.} by replacing {.length} by {["length"]}. 2. Got rid of one {=} by replacing {c[-!1]!=g} by {c[-!1]-g}. 3. Got rid of one {()} by replacing {!(g>1)} by {![g>1][-!1]}. 4. Finally, because count per character is now 4, the backslashes can be taken out. Update: 1. Got rid of all {"} by replacing {"length"} by {`length`} and exploiting shortcut evaluation. {aaaeehhhlmmnnnpst} is not defined but is not evaluated either because of {c} which must be evaluated to true. Update: 1. Got rid of all {c} by shortcutting the undefined variable at {split(i)} and replacing all {c} by {a}. Since {i} is never an empty string, it is always evaluated true (except compared directly to true). Update: 1. Got rid of all {,} by moving the assignment after the argument list. The {()} at the front can therefore be moved to the assignment, retaining same number of {()}s. 
edited body
Source Link
Shieru Asakoto
  • 6.5k
  • 19
  • 44
(o, // Input c=oa=o.split``.map( // Split the input into character array and i=>o.split(i||eehhhlmmnnnpst)[`length`]-1 // count the occurrences of each character. ) )=>!ca.some( // Then check g=>![g>1,,,][-!1] // If each character appears at least 2 times ||c[||a[-!1]-g // and the counts are all the same number. ) More to add: 1. Using {s.split``} instead of {[...s]} is to reduce the number of {.} that dominates the count. 2. Using {!c.some} instead of {c.every} to reduce the number of inefficient characters (v,r,y in every) 3. Still one unavoidable inefficient character left ({h}). Update: 1. Got rid of one {.} by replacing {.length} by {["length"]}. 2. Got rid of one {=} by replacing {c[-!1]!=g} by {c[-!1]-g}. 3. Got rid of one {()} by replacing {!(g>1)} by {![g>1][-!1]}. 4. Finally, because count per character is now 4, the backslashes can be taken out. Update: 1. Got rid of all {"} by replacing {"length"} by {`length`} and exploiting shortcut evaluation. {aaaeehhhlmmnnnpst} is not defined but is not evaluated either because of {c} which must be evaluated to true. Update: 1. Got rid of all {c} by shortcutting the undefined variable at {split(i)} and replacing all {c} by {a}. Since {i} is never an empty string, it is always evaluated true (except compared directly to true). 
(o, // Input c=o.split``.map( // Split the input into character array and i=>o.split(i||eehhhlmmnnnpst)[`length`]-1 // count the occurrences of each character. ) )=>!c.some( // Then check g=>![g>1,,,][-!1] // If each character appears at least 2 times ||c[-!1]-g // and the counts are all the same number. ) More to add: 1. Using {s.split``} instead of {[...s]} is to reduce the number of {.} that dominates the count. 2. Using {!c.some} instead of {c.every} to reduce the number of inefficient characters (v,r,y in every) 3. Still one unavoidable inefficient character left ({h}). Update: 1. Got rid of one {.} by replacing {.length} by {["length"]}. 2. Got rid of one {=} by replacing {c[-!1]!=g} by {c[-!1]-g}. 3. Got rid of one {()} by replacing {!(g>1)} by {![g>1][-!1]}. 4. Finally, because count per character is now 4, the backslashes can be taken out. Update: 1. Got rid of all {"} by replacing {"length"} by {`length`} and exploiting shortcut evaluation. {aaaeehhhlmmnnnpst} is not defined but is not evaluated either because of {c} which must be evaluated to true. Update: 1. Got rid of all {c} by shortcutting the undefined variable at {split(i)} and replacing all {c} by {a}. Since {i} is never an empty string, it is always evaluated true (except compared directly to true). 
(o, // Input a=o.split``.map( // Split the input into character array and i=>o.split(i||eehhhlmmnnnpst)[`length`]-1 // count the occurrences of each character. ) )=>!a.some( // Then check g=>![g>1,,,][-!1] // If each character appears at least 2 times ||a[-!1]-g // and the counts are all the same number. ) More to add: 1. Using {s.split``} instead of {[...s]} is to reduce the number of {.} that dominates the count. 2. Using {!c.some} instead of {c.every} to reduce the number of inefficient characters (v,r,y in every) 3. Still one unavoidable inefficient character left ({h}). Update: 1. Got rid of one {.} by replacing {.length} by {["length"]}. 2. Got rid of one {=} by replacing {c[-!1]!=g} by {c[-!1]-g}. 3. Got rid of one {()} by replacing {!(g>1)} by {![g>1][-!1]}. 4. Finally, because count per character is now 4, the backslashes can be taken out. Update: 1. Got rid of all {"} by replacing {"length"} by {`length`} and exploiting shortcut evaluation. {aaaeehhhlmmnnnpst} is not defined but is not evaluated either because of {c} which must be evaluated to true. Update: 1. Got rid of all {c} by shortcutting the undefined variable at {split(i)} and replacing all {c} by {a}. Since {i} is never an empty string, it is always evaluated true (except compared directly to true). 
added 239 characters in body
Source Link
Shieru Asakoto
  • 6.5k
  • 19
  • 44
(o, // Input c=o.split``.map( // Split the input into character array and i=>o.split(i||eehhhlmmnnnpst)[`length`]-1 // and count the occurrences of each character. )  // Then check )=>!c.some( // If each character appears at least 2Then timescheck g=>![g>1,,,][-!1] // and theIf countseach allcharacter equalappears toat theleast same2 number.times ||c[-!1]-g // Paddingand passedthe ascounts redundantare argumentall tothe makesame number. ) // the program non-discriminating (26 * 4). More to add: 1. Using {s.split``} instead of {[...s]} is to reduce the number of {.} that dominates the  count. 2. Using {!c.some} instead of {c.every} to reduce the number of inefficient characters  (v,r,y in every) 3. Still a pile ofone unavoidable inefficient characterscharacter left ({h}). Update: 1. Got rid of one {.} by replacing {.length} by {["length"]}. 2. Got rid of one {=} by replacing {c[-!1]!=g} by {c[-!1]-g}. 3. Got rid of one {()} by replacing {!(g>1)} by {![g>1][-!1]}. 4. Finally, because count per character is now 4, the backslashes can be taken out. Update: 1. Got rid of all {"} by replacing {"length"} by {`length`} and exploiting shortcut  evaluation. {aaaeehhhlmmnnnpst} is not defined but is not evaluated either because of {c} which  must be evaluated to true. Update: 1. Got rid of all {c} by shortcutting the undefined variable at {split(i)} and replacing  all {c} by {a}. Since {i} is never an empty string, it is always evaluated true (except compared directly to true). 
(o, // Input c=o.split``.map( // Split the input into character array i=>o.split(i||eehhhlmmnnnpst)[`length`]-1 // and count the occurrences of each character. )  // Then check )=>!c.some( // If each character appears at least 2 times g=>![g>1,,,][-!1] // and the counts all equal to the same number. ||c[-!1]-g // Padding passed as redundant argument to make ) // the program non-discriminating (26 * 4). More to add: 1. Using {s.split``} instead of {[...s]} is to reduce the number of {.} that dominates the count. 2. Using {!c.some} instead of {c.every} to reduce the number of inefficient characters (v,r,y in every) 3. Still a pile of unavoidable inefficient characters. Update: 1. Got rid of one {.} by replacing {.length} by {["length"]}. 2. Got rid of one {=} by replacing {c[-!1]!=g} by {c[-!1]-g}. 3. Got rid of one {()} by replacing {!(g>1)} by {![g>1][-!1]}. 4. Finally, because count per character is now 4, the backslashes can be taken out. Update: 1. Got rid of all {"} by replacing {"length"} by {`length`} and exploiting shortcut evaluation. {aaaeehhhlmmnnnpst} is not defined but is not evaluated either because of {c} which must be evaluated to true. Update: 1. Got rid of all {c} by shortcutting the undefined variable at {split(i)} and replacing all {c} by {a}. 
(o, // Input c=o.split``.map( // Split the input into character array and i=>o.split(i||eehhhlmmnnnpst)[`length`]-1 // count the occurrences of each character. ) )=>!c.some( // Then check g=>![g>1,,,][-!1] // If each character appears at least 2 times ||c[-!1]-g // and the counts are all the same number. ) More to add: 1. Using {s.split``} instead of {[...s]} is to reduce the number of {.} that dominates the  count. 2. Using {!c.some} instead of {c.every} to reduce the number of inefficient characters  (v,r,y in every) 3. Still one unavoidable inefficient character left ({h}). Update: 1. Got rid of one {.} by replacing {.length} by {["length"]}. 2. Got rid of one {=} by replacing {c[-!1]!=g} by {c[-!1]-g}. 3. Got rid of one {()} by replacing {!(g>1)} by {![g>1][-!1]}. 4. Finally, because count per character is now 4, the backslashes can be taken out. Update: 1. Got rid of all {"} by replacing {"length"} by {`length`} and exploiting shortcut  evaluation. {aaaeehhhlmmnnnpst} is not defined but is not evaluated either because of {c} which  must be evaluated to true. Update: 1. Got rid of all {c} by shortcutting the undefined variable at {split(i)} and replacing  all {c} by {a}. Since {i} is never an empty string, it is always evaluated true (except compared directly to true). 
added 239 characters in body
Source Link
Shieru Asakoto
  • 6.5k
  • 19
  • 44
Loading
added 60 characters in body
Source Link
Shieru Asakoto
  • 6.5k
  • 19
  • 44
Loading
added 60 characters in body
Source Link
Shieru Asakoto
  • 6.5k
  • 19
  • 44
Loading
added 60 characters in body
Source Link
Shieru Asakoto
  • 6.5k
  • 19
  • 44
Loading
added 668 characters in body; added 30 characters in body
Source Link
Shieru Asakoto
  • 6.5k
  • 19
  • 44
Loading
added 809 characters in body
Source Link
Shieru Asakoto
  • 6.5k
  • 19
  • 44
Loading
added 332 characters in body
Source Link
Shieru Asakoto
  • 6.5k
  • 19
  • 44
Loading
added 522 characters in body
Source Link
Shieru Asakoto
  • 6.5k
  • 19
  • 44
Loading
added 522 characters in body
Source Link
Shieru Asakoto
  • 6.5k
  • 19
  • 44
Loading
Source Link
Shieru Asakoto
  • 6.5k
  • 19
  • 44
Loading