| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- 프로그래머스
- C#강의
- spring
- LCM
- 완전탐색
- 백준
- Python
- appendleft
- 브루투포스
- 파이썬
- c#
- 소수찾기
- 인프런
- BFS
- 그리디 알고리즘
- Java
- JPA
- 합 구하기
- 누적합
- deque
- python3
- unity
- DP
- 연관관계
- pypy3
- 우선순위큐
- 1일1솔
- 소수판별
- popleft
- mvc
- Today
- Total
목록queue (2)
jae_coding
문제 문제 링크 코드 import sys from collections import deque input = sys.stdin.readline n = int(input()) colors = deque(input().strip()) result_colors = list() primary_color = "" while colors: x = colors.popleft() if x != primary_color: result_colors.append(x) primary_color = x if result_colors.count('B') >= result_colors.count('R'): result = 1 + result_colors.count('R') else: result = 1 + result_colors..
컬렉션 배열의 크기에 대한 단점을 보완해주는 집합체 ArrayList: 연산량이 많아 과부하가 걸릴 수 있다. using System.Collections; using System.Collections.Generic; using UnityEngine; public class Unity_lecture : MonoBehaviour { //배열의 크기가 5로 고정 int[] exp = new int[5] {1, 2, 3, 4, 5}; //컬렉션: 리스트, 큐, 스택, 해시테이블, 딕셔너리, 어레이리스트 //컬렉션을 사용하기 위해서는 using System.Collections;를 head에 넣어주어야함 ArrayList arrayList = new ArrayList(); void Start(){ // Add:..