This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Destructer delete object by itself when its reference is 0 | |
from abc import ABC, ABCMeta, abstractclassmethod | |
''' | |
Abstract classes are classes that contain one or more abstract methods. An abstract method is a method that is declared, | |
but contains no implementation. Abstract classes may not be instantiated, and require subclasses to provide | |
implementations for the abstract methods. | |
''' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__='Sudhanshu Patel' | |
''' | |
Binary search tree implementation | |
# goes left if key less than node.key else right | |
1. insetion | |
2. Preorder | |
3. postorder | |
4. inorder traversal | |
5. find max depth | |
6. print all leaf node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python # This is client.py file | |
import socket # Import socket module | |
s = socket.socket() # Create a socket object | |
host = socket.gethostname() # Get local machine name | |
port = 12345 # Reserve a port for your service. | |
s.connect((host, port)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__='Sudhanshu Patel' | |
''' | |
Binary search tree implementation | |
# goes left if key less than node.key else right | |
1. insetion | |
2. Preorder | |
3. postorder | |
4. inorder traversal | |
5. find max depth | |
6. print all leaf node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# One Way Link List | |
''' | |
1. Insertion at beginning | |
2. Insertion at end | |
3. Insertion at given postion | |
4. deletion from beginning | |
5. deletion from the end | |
6. deletion from given postion | |
''' | |
class Node: |
NewerOlder