AmitDiwan has Published 10744 Articles

Difference Between Network Operating System and Distributed Operating System

AmitDiwan

AmitDiwan

Updated on 16-Apr-2021 07:34:31

3K+ Views

In this post, we will understand the difference between network operating system and a distributed operating system.Network Operating SystemThe main object of this system is to provide local services to remote clients.The communication takes place depending on the files.It is more scalable in comparison to Distributed Operating System.It has less ... Read More

Python program to copy all elements of one array into another array

AmitDiwan

AmitDiwan

Updated on 15-Apr-2021 13:48:39

1K+ Views

When it is required to copy all the elements from one array to another, an empty array with ‘None’ elements is created. A simple for loop is used to iterate over the elements, and the ‘=’ operator is used to assign values to the new list.Below is a demonstration of ... Read More

Python Program to Construct a Tree & Perform Insertion, Deletion, Display

AmitDiwan

AmitDiwan

Updated on 15-Apr-2021 13:47:54

632 Views

When it is required to construct a binary tree, and perform operations such as inserting an element, deleting an element and displaying elements of the tree, a class is defined with methods in it. An instance of the class is defined and this is used to access the elements and ... Read More

Check whether a number has consecutive 0’s in the given base or not using Python

AmitDiwan

AmitDiwan

Updated on 15-Apr-2021 13:44:27

209 Views

When it is required to check if a number has consecutive zeroes of a specific base, a method is defined, that takes the number and base as parameters, and uses another method to return Yes or No depending on whether the base is present or not.Below is a demonstration of ... Read More

Program to Implement Queue in Python

AmitDiwan

AmitDiwan

Updated on 15-Apr-2021 13:43:53

1K+ Views

When it is required to implement a queue using Python, a queue class is created, and methods to add and delete elements are defined. An instance of the class is created, and these methods are called using the instance and relevant output is displayed.Below is a demonstration of the same ... Read More

Python Program to Implement a Stack

AmitDiwan

AmitDiwan

Updated on 15-Apr-2021 13:43:28

4K+ Views

When it is required to implement a stack using Python, a stack class is created, and an instance of this class is created. Methods to push, pop elements are defined and the instance is used to call these methods.Below is a demonstration of the same −Example Live Democlass Stack_struct:    def ... Read More

Python Program to Build Binary Tree if Inorder or Postorder Traversal as Input

AmitDiwan

AmitDiwan

Updated on 15-Apr-2021 13:35:40

417 Views

When it is required to build a binary tree by taking input using inorder or postorder traversal, a class is defined, that has methods to set the root element, perform inorder traversal, perform post order traversal. It can be used by creating an instance of the class.Below is a demonstration ... Read More

Python Program to Find Nth Node in the Inorder Traversal of a Tree

AmitDiwan

AmitDiwan

Updated on 15-Apr-2021 13:35:21

239 Views

When it is required to find the ‘n’th node using inorder traversal of a binary tree, a binary tree class is created with methods to set the root element, add elements to left or right, perform in order traversal and so on. An instance of the class is created, and ... Read More

Python Program to Convert a given Singly Linked List to a Circular List

AmitDiwan

AmitDiwan

Updated on 15-Apr-2021 13:34:59

368 Views

When it is required to convert a singly linked list into a circular linked list, a method named ‘convert_to_circular_list’ is defined that ensures that the last elements points to the first element, thereby making it circular in nature.Below is a demonstration of the same −Example Live Democlass Node:    def __init__(self, ... Read More

Python Program to Check whether a Singly Linked List is a Palindrome

AmitDiwan

AmitDiwan

Updated on 15-Apr-2021 13:27:17

222 Views

When it is required to check if a singly linked list is a palindrome or not, methods to add an element, get the previous node and to check if a palindrome is formed are defined.Below is a demonstration of the same −Example Live Democlass Node:    def __init__(self, data):     ... Read More

Advertisements