7 kyu
Simple Fun #30: Strings Construction
431 of 1,115myjinxin2015
Description:
Task
How many strings equal to A can be constructed using letters from the string B? Each letter can be used only once and in one string only.
Example
For A = "abc" and B = "abccba"
, the output should be 2
.
We can construct 2 strings A
with letters from B
.
Input/Output
[input]
stringA
String to construct, A contains only lowercase English letters.
Constraints:
3 ≤ A.length ≤ 9
.[input]
stringB
String containing needed letters,
B
contains only lowercase English letters.Constraints:
3 ≤ B.length ≤ 50
.[output]
an integer
Puzzles
Similar Kata:
Stats:
Created | Jan 24, 2017 |
Published | Jan 24, 2017 |
Warriors Trained | 3116 |
Total Skips | 65 |
Total Code Submissions | 5206 |
Total Times Completed | 1115 |
JavaScript Completions | 431 |
C# Completions | 115 |
Python Completions | 578 |
C Completions | 26 |
TypeScript Completions | 25 |
Total Stars | 50 |
% of votes with a positive feedback rating | 93% of 221 |
Total "Very Satisfied" Votes | 191 |
Total "Somewhat Satisfied" Votes | 28 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 6 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |