From 7bbacc021c9e4903eaa84e6424d419cb8791acf3 Mon Sep 17 00:00:00 2001 From: Abhijit2505 Date: Sun, 9 Aug 2020 20:54:24 +0530 Subject: [PATCH] Added code for the documentation --- start.html | 539 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 539 insertions(+) create mode 100644 start.html diff --git a/start.html b/start.html new file mode 100644 index 0000000..4a61001 --- /dev/null +++ b/start.html @@ -0,0 +1,539 @@ + + + + + eduAlgo - Documentations + + + + + + + + + + + + + + + +
+ +
+
+
+

Documentation

+
Last updated: 9th Aug, 2020
+
+
+
+
+
+

Download

+
+

This python package has been published with Python Package Index (PyPI) at eduAlgo. There are two different ways to download the .tar and the .whl file manually, +

+

+
+
+
+

Fast Installation

+
+

Option - 1

+

By using command prompt/python prompt, one can easily install it using pip.

+
+

pip install eduAlgo

+
+
+
+

Option - 2

+

+ For Anaconda distribution users, one can install the Package + by running the following piece of code in your anaconda powershell prompt. +

+
+

conda install eduAlgo

+
+
+
+ +
+

Modules, Methods and Parameters

+
+

+ The current version of eduAlgo, v1.1.0 has only two small modules included, +

    +
  • + algorithm +
  • +
  • + LinkedList +
  • +
+

+
+

Modules


+
+

algorithm

+

+ The algorithm module of the eduAlgo package contains two simple classic sorting algorithms, +

    +
  • + Bubble Sort +
  • +
  • + Selection Sort +
  • +
+

+
+
+ +
+
+

Important Information:

+

The development process of this package is ongoing at eduAlgo GITHUB. The modules are incomplete and as soon as the development phase ends the + stable version will be released, which will contain a lot of functionalities and algorithms.

+
+
+
+
+
+
Python Code Example
+
from edualgo import algorithm as al
+
+arr = [5,4,3,2,1]
+obj = al.sort()
+sorted_arr = obj.bubble_sort(arr)
+print(sorted_arr)
+
Output:
+
+Bubble Sort Runtime = 0.0
+[1, 2, 3, 4, 5]
+
+
+
+
+
+

LinkedList

+

+ The LinkedList module of the eduAlgo package contains seven classic LinkedList algorithms, +

    +
  • + Palindromic Linked List -
  • +
  • Remove Linked List Elements -
  • +
  • Remove Duplicates From a Sorted List -
  • +
  • Merge Two Sorted List -
  • +
  • Reverse Linked List -
  • +
  • Delete Node In a Linked List -
  • +
  • Middle Of the Linked List -
  • +
  • Length of the Linked List -
  • +
+

+
+
Palindromic Linked List
+

+ Module: list_algorithms()
+ Method : is_palindrome(head), is_palindrome_optimized(head)
+ Uses : To check if a Linked List is palindromic or not. "is_palindrome_optimized()" is the optimized version of + the same using another algorithmic approach unlike the normal one which uses stack.
+ Parameters : head - head node of the Linked List, this method returs a boolean variable. +

+
+
+
+
Python Code Example
+
from edualgo import LinkedList as ll
+
+llist1 = ll.linkedlist()
+arr1 = list(map(int,input().split()))
+for i in arr1:
+    llist1.append(i)
+sol = ll.list_algorithms()
+print(sol.is_palindrome(llist1.head))
+
Input:
+1 2 2 2 1
+Output:
+True
+      
+
+
+
+
+
+
Remove Linked List Elements
+

+ Module: list_algorithms()
+ Method : removeElements(head,val)
+ Uses : To remove all the occurance of a specific element passed as an arguement "val".
+ Parameters : head - head node of the Linked List, val - value to remove all the occurances. This method returns a Linked List node obejct. +

+
+
+
+
Python Code Example
+
from edualgo import LinkedList as ll
+
+llist1 = ll.linkedlist()
+arr1 = list(map(int,input().split()))
+for i in arr1:
+    llist1.append(i)
+num = int(input())
+sol = ll.list_algorithms()
+
+llist3 = ll.linkedlist()
+llist3.head = sol.removeElements(llist1.head,num)
+llist3.printLL()
+
Input:
+1 2 3 4 5 6 6 2 2 4 9
+6
+Output:
+1 2 3 4 5 2 2 4 9 
+      
+
+
+
+
+
+
Remove Duplicates From a Sorted List
+

+ Module: list_algorithms()
+ Method : delete_sorted_duplicates(head)
+ Uses : To remove all the duplicate occurance from a sorted Linked List
+ Parameters : head - head node of the Linked List. This method returns a Linked List node obejct. +

+
+
+
+
Python Code Example
+
from edualgo import LinkedList as ll
+
+llist1 = ll.linkedlist()
+arr1 = list(map(int,input().split()))
+for i in arr1:
+    llist1.append(i)
+sol = ll.list_algorithms()
+
+llist3 = ll.linkedlist()
+llist3.head = sol.delete_sorted_duplicate(llist1.head)
+llist3.printLL()
+
Input:
+1 2 2 3 3 5 5 9 9
+Output:
+1 2 3 5 9 
+      
+
+
+
+
+
+
Merge Two Sorted Lists
+

+ Module: list_algorithms()
+ Method : mergeTwoLists(head1,head2)
+ Uses : To merge two Linked Lists.
+ Parameters : head1 - head node of the first + Linked List. head2 - head node of the second Linked List. + This method returns the head of the merged linked list as a Linked List node obejct. +

+
+
+
+
Python Code Example
+
from edualgo import LinkedList as ll
+
+llist1 = ll.linkedlist()
+llist2 = ll.linkedlist()
+
+arr1 = list(map(int,input().split()))
+arr2 = list(map(int,input().split()))
+
+for i in arr1:
+    llist1.append(i)
+
+for i in arr2:
+    llist2.append(i)
+
+sol = ll.list_algorithms()
+
+llist3 = ll.linkedlist()
+llist3.head = sol.mergeTwoLists(llist1.head,llist2.head)
+llist3.printLL()
+
Input:
+1 2 3 2 1
+4 5 6 8 9
+Output:
+1 2 3 2 1 4 5 6 8 9 
+      
+
+
+
+
+
+
Reverse Linked Lists
+

+ Module: list_algorithms()
+ Method : reverse_linked_recursive(head),
+ reverse_linked_iterative(head)

+ Uses : To reverse a Linked Lists (recursive and iterative approach).
+ Parameters : head- head node of the first + Linked List. This method returns the head of the reversed linked list as a Linked List node obejct. +

+
+
+
+
Python Code Example
+
from edualgo import LinkedList as ll
+
+llist1 = ll.linkedlist()
+
+arr1 = list(map(int,input().split()))
+
+for i in arr1:
+    llist1.append(i)
+
+sol = ll.list_algorithms()
+
+llist3 = ll.linkedlist()
+llist3.head = sol.reverse_linked_iterative(llist1.head)
+llist3.printLL()
+
Input:
+1 2 3 4 5
+Output:
+5 4 3 2 1 
+      
+
+
+
+
+
+
Delete Node In a Linked Lists
+

+ Module: list_algorithms()
+ Method : delete_node(head)
+ Uses : To delete a particular given node passed as a reference.
+ Parameters : head- head node of the first + Linked List. This method returns void. +

+
+
+
+
Python Code Example
+
from edualgo import LinkedList as ll
+
+llist1 = ll.linkedlist()
+
+arr1 = list(map(int,input().split()))
+
+for i in arr1:
+    llist1.append(i)
+
+sol = ll.list_algorithms()
+
+sol.delete_node(llist1.head)
+llist1.printLL()
+
Input:
+1 2 3 4 5 6
+Output:
+2 3 4 5 6 
+      
+
+
+
+
+
+
Middle of the Linked Lists
+

+ Module: list_algorithms()
+ Method : middleNode(head)
+ Uses : To get the middle node of a Linked List.
+ Parameters : head- head node of the first + Linked List. This method returns the middle node as a Linked List Object. +

+
+
+
+
Python Code Example
+
from edualgo import LinkedList as ll
+
+llist1 = ll.linkedlist()
+
+arr1 = list(map(int,input().split()))
+
+for i in arr1:
+    llist1.append(i)
+
+sol = ll.list_algorithms()
+
+print(sol.middleNode(llist1.head).data)
+
Input:
+1 2 3 4 5 6
+Output:
+4 
+      
+
+
+
+
+
+
Length Of the Linked List
+

+ Module: list_algorithms()
+ Method : length(head)
+ Uses : To get the length of a Linked List.
+ Parameters : head- head node of the first + Linked List. This method returns the length of the Linked List as an integer. +

+
+
+
+
Python Code Example
+
from edualgo import LinkedList as ll
+
+llist1 = ll.linkedlist()
+
+arr1 = list(map(int,input().split()))
+
+for i in arr1:
+    llist1.append(i)
+
+sol = ll.list_algorithms()
+
+print(sol.length(llist1.head))
+
Input:
+1 2 3 4 5 6
+Output:
+6 
+      
+
+
+
+
+
+
+

Found Some Bugs ? Have some suggestions ?

+
Mail The Developer here - abhijittripathy99@gmail.com
+
+
+
+ + +
+
+
+ +
+
+
+

Are you an ambitious Python Developer ?

+
+
+
+ Instance Theme + + +
+
+
+
+
+

+ Do you want to contribute to our project ? We welcome every python lover to + come forwards and have some fun with our source code. + + Steps to contibute: +

    +
  • + Send an email to the developer here regarding your willingness to contribute + to the project. +
  • +
  • + Have a read of our "How To Contribute" documentation here. +
  • +
+ Keep coding, keep loving python +

+
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + + +