linked stack 3

자료구조 | Linked Queue, Linked Stack | Linked Lists

자료구조 | Singly Linked List | Linked List (tistory.com) 자료구조 | Singly Linked List | Linked List singly Linked List가 동작하기 위해 필요한 클래스 링크드 리스트는 노드로 구성된다. 노드는 노드 자신의 data와 다른 노드와 연결되는 link로 구성된다. 단방향으로만 연결해주는 리스트 형태를 Singl tomatolife.tistory.com Linked Queue Singly Linked List에 미리 구현해둔 함수 중 몇 개를 가져오면 된다. isEmtpy add_rear pop_front import random class Node: def __init__(self, item): self.data = item se..

자료구조 6-2장 | Linked List | 숙명여대 학점교류

학점교류로 듣는 숙명여대 자료구조 day 5. 2021.12.28. 화요일 to be continued..... :D linked stack and queue linked stack * isEmpty : 스택이 비어있는가? linear list에서 top, front로 isEmpty를 체크하였다. 고정 크기가 아닌 경우, 함수 length와 같은 것을 활용할 수 있다. head == None인 경우에 empty인 것이다 ~ 비어있을 때랑 비어있지 않을 때 코드가 달라져야 한다. * peek_front : 첫 원소를 본다(꺼내지 않음) * add_front : push * pop_front : pop linked stack의 구조 LIFO 정적 배열과 달리.. (파이썬은 아니지만..) 문제는 size를 정..

카테고리 없음 2021.12.28

자료구조 6장 | Linked List | 숙명여대 학점교류

학점교류로 듣는 숙명여대 자료구조 day 4. 2021.12.27. 월 Introduction Singly linked list linked stack and queue deque circular list doubly linked list Introduction list a list is a collection data type that has a sequence of elements ex) days of week, months of year linked list elements are physically distributed in memory logically sequential by link pointer # link 변수 variable list size easy to Create, insert, ..