Skip to main content

simple stack, and queue using DoublyCircularLinkedList

Project description

Welcome! stackNqueue

This packages includes Stack.py, Queue.py, DoublyCircularLinkedList.py Stack.py and Queue.py inherit the DoublyCircularLinkedList class from DoublyCircularLinkedList.py

structure of packages

stackNqueue구조

inital states

stackNqueue초기상태

DoublyCircularLinkedList Methods

Method works
append(x) 리스트 끝에 x를 추가한다.
getNode(i: int) i번째 인덱스의 노드를 반환한다.
printList() 리스트를 출력한다.
pop(i: int) i번째 인덱스의 노드를 삭제하고 반환한다. 인자를 주지 않거나 -1을 줬을경우, 끝노드를 삭제하고 반환한다.
insert(i: int, x) i번째 인덱스에 item으로 x를 가진 노드를 삽입한다.

Stack Methods

Stack클래스는 DoublyCircularLinkedList클래스를 상속받는다

Method works
push(x) x값을 가진 노드를 리스트 끝에 추가한다.
pop() 리스트의 끝 노드를 삭제하고 반환한다.
top() 리스트의 끝 노드를 반환한다

Queue Methods

Queue클래스는 DoublyCircularLinkedList클래스를 상속받는다

Method works
enqueue(x) x를 리스트의 첫번 째 front에 추가한다.
dequeue() rear노드 즉, 리스트의 끝 노드를 삭제하고 반환한다.
rear() 첫번째로 추가된 리스트의 끝 노드 rear의 값을 반환한다.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stackNqueue-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file stackNqueue-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: stackNqueue-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.4

File hashes

Hashes for stackNqueue-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 49b72204acd4fefff33a08ad62319dc6efc636395fc57be5b0cb98ebdf376239
MD5 5c93f5001cfde9da4a88a7dd692cffe1
BLAKE2b-256 d061f0640a9b1456dad0d4b6f460d97a2a5ab3f2353e0f90185180e8ba7ad4e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page