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
- PACELC
- Lamda
- terraform
- fcm
- aws
- Validation
- Evaluation License
- CAP
- 분산시스템
- rds
- CHECK
- sns
- kubernetes
- cloudwatch
- fortigate
- SageMaker
- lambda
- serverless
- fortinet
- IaC
- amazonqcli
- VM
- 병목
Archives
- Today
- Total
목록분류 전체보기 (253)
잡다한 IT 지식
문제 링크 리트코드에서 본 모법답안 public int balancedStringSplit(String s) { int res = 0, cnt = 0; //res는 나눠질 수 있는 갯수, cnt는 L이 있으면 ++, R이면 --. for (int i = 0; i < s.length(); ++i) { cnt += s.charAt(i) == 'L' ? 1 : -1; if (cnt == 0) ++res; //cnt가 0인 경우는 R과 L의 갯수가 같은 경우, 즉 나줘질 수 있을 때 밖에 없음. } return res; } 위 코드의 경우, 갯수를 초기화 할 필요도 없고 변수를 두개나 할 필요도 없음. 답지 보기 전에 푼 거. class Solution { public int balancedStringSplit..
알고리즘 문제 풀이/그리디
2021. 4. 6. 16:45
