7 kyu

Frequency sequence

1,759 of 5,009bitfragment

Description:

Your task is to return an output string that translates an input string s by replacing each character in s with a number representing the number of times that character occurs in s and separating each number with the sep character(s).

Example (s, sep --> Output)

"hello world", "-" --> "1-1-3-3-2-1-1-2-1-3-1"
"19999999"   , ":" --> "1:7:7:7:7:7:7:7"
"^^^**$"     , "x" --> "3x3x3x2x2x1"
Strings
Fundamentals

More By Author:

Check out these other kata created by bitfragment

Stats:

CreatedDec 21, 2016
PublishedDec 27, 2016
Warriors Trained7120
Total Skips244
Total Code Submissions12251
Total Times Completed5009
JavaScript Completions1759
Python Completions2125
Haskell Completions111
Ruby Completions227
PHP Completions280
Rust Completions243
TypeScript Completions178
C Completions57
Go Completions265
COBOL Completions6
Total Stars86
% of votes with a positive feedback rating93% of 830
Total "Very Satisfied" Votes731
Total "Somewhat Satisfied" Votes87
Total "Not Satisfied" Votes12
Total Rank Assessments11
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • bitfragment Avatar
  • Unnamed Avatar
  • suic Avatar
  • donaldsebleung Avatar
  • imjasonmiller Avatar
  • henryhamon Avatar
  • a.merezhanyi Avatar
  • Voile Avatar
  • Glyxerine Avatar
  • trashy_incel Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
Ad