Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
Tags
- 투포인터
- dfs
- 코딩테스트
- SQL
- 문제풀이
- MySQL
- Java
- 건강
- 이분탐색
- 코테
- 시뮬레이션
- oracle
- BFS
- 프로그래머스
- 알고리즘
- SWEA
- BOJ
- 백준
- 문자열
- DP
- binary search
- 운동기록
- db
- greedy
- priorityqueue
- 문제해결
- 러닝일지
- math
- COS PRO
- 자바
Archives
- Today
- Total
슈콩
[프로그래머스] Lv.2 스킬트리 본문


[문제]
https://school.programmers.co.kr/learn/courses/30/lessons/49993
프로그래머스
SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프
programmers.co.kr
[소스 코드]
class Solution {
public int solution(String skill, String[] skill_trees) {
int answer = 0;
for(String tree : skill_trees){
String filter = "";
for(char c : tree.toCharArray()){
String s = String.valueOf(c);
if(skill.contains(s)){
filter += s;
}
}
if(skill.startsWith(filter)) answer++;
}
return answer;
}
}'Algorithms > Programmers' 카테고리의 다른 글
| [프로그래머스] Lv.2 주차 요금 계산 (0) | 2025.10.17 |
|---|---|
| [프로그래머스] Lv.2 숫자 변환하기 (0) | 2025.10.16 |
| [프로그래머스] Lv.2 택배상자 (0) | 2025.10.16 |
| [프로그래머스] Lv.2 땅따먹기 (0) | 2025.10.16 |
| [프로그래머스] Lv.2 주식가격 (0) | 2025.10.16 |