일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- deque
- LCM
- Python
- Java
- 우선순위큐
- pypy3
- 소수찾기
- mvc
- JPA
- 1일1솔
- C#강의
- 합 구하기
- BFS
- 완전탐색
- 파이썬
- c#
- 프로그래머스
- 백준
- 그리디 알고리즘
- 누적합
- 소수판별
- 브루투포스
- DP
- 인프런
- unity
- spring
- popleft
- python3
- 연관관계
- appendleft
- Today
- Total
목록stack (2)
jae_coding
컬렉션 배열의 크기에 대한 단점을 보완해주는 집합체 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:..

문제 문제 링크 코드 import sys input = sys.stdin.readline N = int(input()) stack = list() def push(stack, num): stack.append(num) def pop(stack): if len(stack) != 0: n = stack[len(stack)-1] print(n) del stack[-1] else: print(-1) def size(stack): print(len(stack)) def empty(stack): if len(stack) == 0: print(1) else: print(0) def top(stack): if len(stack) != 0: print(stack[len(stack)-1]) else: print(-1) f..