From 9874d99285e3b9b723482ae5f04fc6ac776d8ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20Berke=20TABURLU?= <92319842+mefreanzy@users.noreply.github.com> Date: Sat, 19 Aug 2023 13:35:56 +0300 Subject: [PATCH] Create DOCUMENT.md --- src/DOCUMENT.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/DOCUMENT.md diff --git a/src/DOCUMENT.md b/src/DOCUMENT.md new file mode 100644 index 0000000..7ccafee --- /dev/null +++ b/src/DOCUMENT.md @@ -0,0 +1,27 @@ +# Document + +### [Stack](./src/data_structure/stack.rs) +A stack is a linear data structure that follows the Last-In-First-Out (LIFO) principle. +Elements are added and removed from the top, or "topmost" end of the stack. It operates like a collection of items stacked on top of each other, where the last item added is the first to be removed. +Stacks are used in various applications, such as managing function calls in programming, tracking navigation history, and implementing undo operations. +Common operations on a stack include push (adding an element), pop (removing the top element), and peek (viewing the top element without removal). + +* [Wikipedia](https://en.wikipedia.org/wiki/Stack_(abstract_data_type)) +* [Geeksforgeeks](https://www.geeksforgeeks.org/stack-data-structure/) +* [Tutorialsoint](https://www.tutorialspoint.com/data_structures_algorithms/stack_algorithm.htm) +* [StudyTonight](https://www.studytonight.com/data-structures/stack-data-structure) + +### [Heap](./src/data_structure/heap.rs) +A heap is a binary tree-based data structure where each parent node has a value greater (or smaller, depending on the type of heap) than or equal to the values of its children. This forms a partial ordering among the elements, allowing efficient access to the maximum (or minimum) element. Heaps are commonly used for priority queues, where the highest (or lowest) priority element is quickly accessible. Two types of heaps exist: Max Heap (largest element at the root) and Min Heap (smallest element at the root). Insertion and removal operations maintain the heap property by "heapifying" the tree. + +* [Wikipedia](https://en.wikipedia.org/wiki/Heap_(data_structure)) +* [Alxolr](https://www.alxolr.com/articles/heap-data-structure-implemented-in-rust-language) +* [Geeksforgeeks](https://www.alxolr.com/articles/heap-data-structure-implemented-in-rust-language) +* [Programiz](https://www.programiz.com/dsa/heap-data-structure) + +### [Queue](./src/data_structure/queue.rs) +A queue is a linear data structure that follows the First-In-First-Out (FIFO) principle. Elements are added at the rear, or "enqueue" operation, and removed from the front, or "dequeue" operation, maintaining their original order. This structure simulates a real-life queue, where the first person to join is the first to be served. Queues are used in various applications such as task scheduling, breadth-first searches, and print spooling. Basic operations on a queue include enqueue (adding an element), dequeue (removing the front element), and peek (viewing the front element without removal). + +* [Wikipedia](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)) +* [Geeksforgeeks](https://www.geeksforgeeks.org/queue-data-structure/) +* [Tutorialspoint](https://www.geeksforgeeks.org/queue-data-structure/)