Level1) 문자열 내 p와 y의 개수
class Solution { boolean solution(String s) { String lower = s.toLowerCase(); int pcnt = 1; int ycnt = 0; for (int i = 0; i < lower.length(); i++) { if (lower.charAt(i) == 'p') { pcnt++; } if (lower.charAt(i) == 'y') { ycnt++; } } return (pcnt-1) == ycnt; } } - 성공 - p,y 둘 다 안나오는 경우도 있으니 pcnt = 1로 주고 풀이 class Solution { boolean solution(String s) { s = s.toLowerCase(); int count = 0; for (int i =..
PS/programmers
2020. 9. 8. 16:28
링크
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- js array
- HTTP 완벽 가이드
- 패스트캠퍼스 컴퓨터공학 완주반
- 이펙티브자바 아이템59
- BOJ
- 드림코딩
- 백준
- java
- js promise
- JS 딥다이브
- 김영한 http
- 이펙티브자바
- GCP
- 가상 면접 사례로 배우는 대규모 시스템 설계 기초
- 프로그래머스
- ㅇㄷㅇㅈ
- 프로그래머스 SQL
- 백기선 스터디
- 이펙티브자바 스터디
- 이펙티브자바 아이템60
- REST API
- 킹수빈닷컴
- 모던자바스크립트
- HTTP 완벽가이드
- JPA 연관관계 매핑
- 김영한 JPA
- js api
- dreamcoding
- http
- Spring Security
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함