deque
-
[자료구조] [python] Castle on the Grid (deque)Data miner/Algorithm & Data structure 2021. 2. 3. 18:30
Hackerrank의 Data structures 관한 문제 중에서 Medium에 속하는 문제이다. 원 문제 링크는 다음을 따라가보자. www.hackerrank.com/challenges/castle-on-the-grid/problem Castle on the Grid | HackerRank Determine the number of steps to move a castle to the goal position on a given grid. www.hackerrank.com Deque는 python의 collection 모듈에 구현된 객체/자료형이다. stack과 que의 일반형태의 자료형이며, Deque는 thread-safe (스레드 안전)을 지원하며, 자료의 양방향에서 O(1) 성능으로 원소를 추..