Skip to content

Commit 44543f5

Browse files
committed
Updated Docs
1 parent 6e06994 commit 44543f5

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

docs/Data_Structure.rst

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
===============
2+
Data Structures
3+
===============
4+
5+
Implementing Data Structures purely in Python.
6+
7+
Quick Start Guide
8+
-----------------
9+
10+
.. code-block:: python
11+
12+
# import the required data structure
13+
from pygorithm.data_structures import stack
14+
15+
# create a stack with default stack size 10
16+
myStack = stack.Stack()
17+
myStack.push(2)
18+
19+
# print the contents of stack
20+
print(myStack)
21+
22+
Features
23+
--------
24+
25+
* Data Structures implementations available:
26+
- **Stack**
27+
- Stack (data_structures.stack.Stack)
28+
- Infix to Postfix conversion (data_structures.stack.InfixToPostfix)
29+
- **Queue**
30+
- Queue (data_structures.queue.Queue)
31+
- Deque (data_structures.queue.Deque)
32+
- **Linked List**
33+
- Singly Linked List (data_structures.linked_list.SinglyLinkedList)
34+
- Doubly Linked List (data_structures.linked_list.DoublyLinkedList)
35+
- **Tree**
36+
- Binary Tree (data_structures.tree.BinaryTree)
37+
- Binary Seach Tree (data_structures.tree.BinarySearchTree)
38+
- **Graph**
39+
- Graph (data_structures.graph.Graph)
40+
- Topological Sort (data_structures.graph.TopologicalSort)
41+
- Check cycle in Directed Graph (data_structures.graph.CheckCycleDirectedGraph)
42+
- Check cycle in Undirected Graph (data_structures.graph.CheckCycleUndirectedGraph)
43+
- **Heap**
44+
- Heap (data_structures.heap.Heap)
45+
46+
* Get the code used for any of the implementation
47+
48+
.. code:: python
49+
50+
from pygorithm.data_structures.stack import Stack
51+
52+
myStack = Stack()
53+
print(myStack.get_code())
54+
55+
* To see all the available functions in a module there is a `modules()` function available. For example,
56+
57+
.. code:: python
58+
59+
>>> from pygorithm.data_structures import modules
60+
>>> modules()
61+
['graph', 'heap', 'linked_list', 'queue', 'stack', 'tree']
62+
63+
Stack
64+
-----
65+
66+
.. automodule:: pygorithm.data_structures.stack
67+
68+
Stack
69+
-----
70+
.. autoclass:: Stack
71+
:members:

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Quick Links
2121

2222
Sorting
2323
Searching
24+
Data_Structure
2425
Fibonacci
2526

2627
Quick Start Guide

0 commit comments

Comments
 (0)