7 kyu
Search for letters
1,724 of 6,669Roy Gardiner
Description:
Create a function which accepts one arbitrary string as an argument, and return a string of length 26.
The objective is to set each of the 26 characters of the output string to either '1'
or '0'
based on the fact whether the Nth letter of the alphabet is present in the input (independent of its case).
So if an 'a'
or an 'A'
appears anywhere in the input string (any number of times), set the first character of the output string to '1'
, otherwise to '0'
. if 'b'
or 'B'
appears in the string, set the second character to '1'
, and so on for the rest of the alphabet.
For instance:
"a **& cZ" => "10100000000000000000000001"
"aaaaaaa79345675" => "10000000000000000000000000"
"&%#*" => "00000000000000000000000000"
Strings
Fundamentals
Similar Kata:
Stats:
Created | Jan 19, 2014 |
Published | Jan 19, 2014 |
Warriors Trained | 12775 |
Total Skips | 1484 |
Total Code Submissions | 24565 |
Total Times Completed | 6669 |
Ruby Completions | 1724 |
JavaScript Completions | 2207 |
C# Completions | 408 |
Python Completions | 1936 |
Haskell Completions | 79 |
C Completions | 180 |
Rust Completions | 164 |
TypeScript Completions | 114 |
Java Completions | 79 |
PHP Completions | 23 |
Total Stars | 133 |
% of votes with a positive feedback rating | 92% of 826 |
Total "Very Satisfied" Votes | 717 |
Total "Somewhat Satisfied" Votes | 91 |
Total "Not Satisfied" Votes | 18 |