Metadata-Version: 2.1
Name: ds-stack
Version: 0.0.1
Summary: stack data structure
Home-page: 
Author: Yashas R Nair
Author-email: <yashasrnair@gmail.com>
License: MIT
Keywords: ds_stack,stack,data structure,data structure stack
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Education
Classifier: Operating System :: Microsoft :: Windows 
Classifier: Operating System :: MacOS :: MacOS X 
Classifier: Operating System :: Unix 
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENCE.txt


Data Structure :- Stack

This python module can use the different functions of Stack Data Structure

like:

1.isempty(<Stack>)

2.push(<Stack>,<item_needed_to_be_added_to_the_stack>)

3.pop(<Stack>)

4.peek(<Stack>)

5.display(<Stack>)



To Install:



   pip install ds_stack



Useage:

(1) .isempty function returns True or false , Must input a list and store return value in a variable in main code

(2) .push function returns the stack,top , Must input a list,an value to push in the stack  and store return value in a variable in main code

(3) pop function prints the error(or) returns the stack,the removed item, The top .Must input a list and store return value in a variable in main code

(4) .peek function returns the error(or)top's value . Must input a list and store return value in a variable in main code

(5) .display function returns the error(or)stack in order . Must input a list and direct exection in main code





Examples:

(1) .isempty(<Stack>):



     import ds_stack as stack

     a=[2,3,4,5,6] #stack

     x=stack.isempty(a)

     print(x)  



     #O/P

     #True

(2) .push(<Stack>,<item_needed_to_be_added_to_the_stack>):



     import ds_stack as stack

     a=[2,3,4,5,6]

     a,t=stack.push(a,9)

     print(a)

     print(t)  



     #O/P

     #SUCCESS

     #[2,3,4,5,6,9]

     #5

(3) .pop(<Stack>):



     import ds_stack as stack

     a=[2,3,4,5,6] #stack

     a,t,i =stack.pop(a)

     print(a)  

     print(t)

     print(i)



     #O/P

     #[2,3,4,5]

     #3

     #6

(4) .peek(<Stack>):



     import ds_stack as stack

     a=[2,3,4,5,6] #stack

     t=stack.peek(a)

     print(t)  



     #O/P

     #6

(5) .display(<Stack>):



     import ds_stack as stack

     a=[2,3,4,5,6] #stack

     stack.display(a) 



     #O/P

     #6 <---top

     #5

     #4

     #3

     #2



=========================================================================

                    😊😊😊 HAPPY CODING😊😊😊

=========================================================================



Kindly point out any error or a feature that needs to be added
