Skip to main content
added 17 characters in body
Source Link
Steadybox
  • 16.6k
  • 5
  • 42
  • 84

C (gcc), score:  113  103 100  96 96  91

Thanks to @ugoren, @CalculatorFeline, and @gastropner, @l4m2, and @JS1 for their tips.

z;gg(char*s){int y[238]={z=0};while(*s)z+=*y-=-y[*s++];z-y[*s++];*y/=~0;=1;}

Initializes an array of zeros, then uses the ASCII values of the characters in the string as indices to that array to keep track of the number of instances of each character in the string.

Try it online!Try it online!

C (gcc), score:  113  103 100  96

Thanks to @ugoren, @CalculatorFeline, and @gastropner for their tips.

z;g(char*s){int y[238]={z=0};while(*s)z+=--y[*s++];z/=~0;}

Initializes an array of zeros, then uses the ASCII values of the characters in the string as indices to that array to keep track of the number of instances of each character in the string.

Try it online!

C (gcc), score:  113  103 100   96  91

Thanks to @ugoren, @CalculatorFeline, @gastropner, @l4m2, and @JS1 for their tips.

g(char*s){int y[238]={};while(*s)*y-=--y[*s++];*y/=1;}

Initializes an array of zeros, then uses the ASCII values of the characters in the string as indices to that array to keep track of the number of instances of each character in the string.

Try it online!

added 91 characters in body
Source Link
Steadybox
  • 16.6k
  • 5
  • 42
  • 84

C (gcc)C (gcc), score:   113   103 103 100 100  96

Thanks to @ugoren and, @CalculatorFeline, and @gastropner for their tips.

z;g(char*s){int y[128]={z=0};while(*s)z+=--y[*s++];z=-z;}
z;g(char*s){int y[238]={z=0};while(*s)z+=--y[*s++];z/=~0;}

Initializes an array of zeros, then uses the ASCII values of the characters in the string as indices to that array to keep track of the number of instances of each character in the string.

Try it online!Try it online!

C (gcc), score: 113 103 100

Thanks to @ugoren and @CalculatorFeline for their tips.

z;g(char*s){int y[128]={z=0};while(*s)z+=--y[*s++];z=-z;}

Initializes an array of zeros, then uses the ASCII values of the characters in the string as indices to that array to keep track of the number of instances of each character in the string.

Try it online!

C (gcc), score:   113   103 100  96

Thanks to @ugoren, @CalculatorFeline, and @gastropner for their tips.

z;g(char*s){int y[238]={z=0};while(*s)z+=--y[*s++];z/=~0;}

Initializes an array of zeros, then uses the ASCII values of the characters in the string as indices to that array to keep track of the number of instances of each character in the string.

Try it online!

added 266 characters in body
Source Link
Steadybox
  • 16.6k
  • 5
  • 42
  • 84

C (gcc), score: 113 103103 100

Thanks to @ugoren and @CalculatorFeline for their tips.

z;g(char*s){int y[128]={z=0};while(*s)z+=++y[*s++];z=z;z+=--y[*s++];z=-z;}

Try it online! Initializes an array of zeros, then uses the ASCII values of the characters in the string as indices to that array to keep track of the number of instances of each character in the string.

Try it online!

C (gcc), score: 113 103

z;g(char*s){int y[128]={z=0};while(*s)z+=++y[*s++];z=z;}

Try it online!

C (gcc), score: 113 103 100

Thanks to @ugoren and @CalculatorFeline for their tips.

z;g(char*s){int y[128]={z=0};while(*s)z+=--y[*s++];z=-z;}

Initializes an array of zeros, then uses the ASCII values of the characters in the string as indices to that array to keep track of the number of instances of each character in the string.

Try it online!

added 20 characters in body
Source Link
Steadybox
  • 16.6k
  • 5
  • 42
  • 84
Loading
added 19 characters in body
Source Link
Steadybox
  • 16.6k
  • 5
  • 42
  • 84
Loading
added 38 characters in body
Source Link
Steadybox
  • 16.6k
  • 5
  • 42
  • 84
Loading
Source Link
Steadybox
  • 16.6k
  • 5
  • 42
  • 84
Loading