문제
https://school.programmers.co.kr/learn/courses/30/lessons/49993#
코드
class Solution {
public int solution(String skill, String[] skill_trees) {
int answer = 0;
for(String str : skill_trees){
String temp = "";
for(int i=0;i<str.length();i++){
if(skill.contains(str.substring(i, i+1))){
temp += str.substring(i, i+1);
}
}
if(skill.indexOf(temp) == 0) answer+=1;
}
return answer;
}
}