Stack1 IM5일차 TIL (Stack & Queue) 오늘은 데이터 구조에 대해서 배우는 시간이었다. 이번 시간에 배운 것은 stack 과 queue 였다. stack은 LIFO: last in, first out 의 개념으로 정보가 위로 차곡차곡 쌓이며 쌓은 이후 가장 위에 쌓였던 정보가 우선적으로 나오는 형태이다. 접시를 쌓는 거나, 하노이의 탑의 구조를 생각하면 이해하기 쉽다. stack method가 존재 하며 해당 메소드는 다음과 같다. pop — Pulls (removes) the element out of the stack. The location is specified by the pointer push — Pushes (inserts) the element in the stack. The location is specified by the .. 2020. 5. 1. 이전 1 다음