窓の外、夕日に照らされた校門のところで、下校する生徒たちが一列に並んでバスを待ってるよ。 「先頭から乗って、後ろに並ぶ」。これ、第4回(ロジック編)でやった「キュー(行列)」の基本だったよね。 キミ、Pythonでこういう「行列」を作るとき ...
今回の記事ではいつもAtcoder中にpythonの普通のリストだと計算量的に間に合わないけどなんかデータ型使えば上手く行けたはず,,,ってのを記事にしてまとめておきます. リスト型の計算量について ・heapq.heapify(リスト)でリストを優先度付きキューに変換 ...
This project was on circular double ended queues (deque) using both a circular array and a circular doubly linked list (CDLL) as underlying structures. This project was for my data structures and ...
Classic Snake Game built with pygame library and collections.deque(Arrays are terrible for the memory). The snake can eat food, grow longer, and collide with itself. Who likes boundaries, so snake is ...