일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 피보나치 수
- 파이썬 포렌식
- collections.deque
- codesingal
- 2015 봄학기 알고리즘
- 10953
- cpp
- codesignal
- Counting cells in a blob
- 2750
- centuryFromYear
- data_structure
- adjacentElementsProduct
- til
- Daily Commit
- recursion
- 파이썬머신러닝완벽가이드
- All Longest Strings
- flask
- C++
- baekjun
- matrixElementsSum
- Python
- Numpy
- 백준
- 수 정렬하기
- shapeArea
- markdown
- almostIncreasingSequence
- Sequential Search
Archives
- Today
- Total
목록data_structure 1
Introfor
[data_structure] Queue
Queue는 스택과 달리 한 쪽에서 들어가서 다른 한 쪽으로 나오는 구조로 파이프을 연상하면 쉽게 이해할 수 있다. 일직선으로 양쪽이 뚫린 파이프 모형에 어떤 물체를 넣는다면 처음에 넣어던 물체가 제일 처음 나오는 구조인 것을 알 수 있다. 이것을 FIFO(First In First Out)이라고 한다. class Queue: def __init__(self): self.items = [] self.max = 5 def add(self, item): if len(self.items) 0: self.items.pop(0) else:..
Doing/Python
2020. 7. 21. 13:21