일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- data_structure
- flask
- 10953
- 수 정렬하기
- Python
- 파이썬 포렌식
- All Longest Strings
- almostIncreasingSequence
- markdown
- 파이썬머신러닝완벽가이드
- Daily Commit
- collections.deque
- shapeArea
- Numpy
- matrixElementsSum
- Sequential Search
- codesingal
- recursion
- 2750
- 백준
- C++
- codesignal
- Counting cells in a blob
- til
- 2015 봄학기 알고리즘
- adjacentElementsProduct
- 피보나치 수
- baekjun
- centuryFromYear
- cpp
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