Articles on Trending Technologies

Technical articles with clear explanations and examples

Maximum length cycle that can be formed by joining two nodes of a binary tree in C++

Sunidhi Bansal
Sunidhi Bansal
Updated on 03-Aug-2020 328 Views

We are given a binary tree. The goal is to find the maximum length cycle in the given tree. We will do this by finding the maximum height of the left subtree and right subtree from the root node and will join these maximum length paths to get the longest cycle.For the above tree the maximum length cycle is 1-2-3-4-7-6 or 1-6-7-4-3-2-1. The length is 6.Input − treeOutput − Maximum length cycle is − 5Explanation − The max height of left subtree is 3 and of right subtree is 1. Cycle length becomes 3+1+1=5. Cycle is 1-2-3-4-6 or 1-6-4-3-2Input − ...

Read More

Construct Tree from given Inorder and Preorder traversals in C++

Sunidhi Bansal
Sunidhi Bansal
Updated on 03-Aug-2020 1K+ Views

We are given the Inorder and Preorder traversals of a binary tree. The goal is to construct a tree from given traversals.Inorder traversal − In this type of tree traversal, a left subtree is visited first, followed by the node and right subtree in the end.Inorder (tree root)Traverse left subtree of node pointed by root, call inorder ( root→left )Visit the rootTraverse right subtree of node pointed by root, call inorder ( root→right )Preorder traversal − In this type of tree traversal, the node visited first, followed by the left subtree and right subtree in the end.Preorder (tree root)Visit the ...

Read More

Continuous Tree in C++

Sunidhi Bansal
Sunidhi Bansal
Updated on 03-Aug-2020 286 Views

A Continuous Tree is defined as a tree with any path from root node to leaf node has value or weight of nodes such that the absolute difference between the parent node and all of its direct children nodes is always 1.If we pick any node on the path from root to leaf, then|weight of node-weight of left child node|=|weight of left child node-weight of node| = 1, this holds true for right child as well|weight of node-weight of right child node|=|weight lof right child node-weight of node| = 1DiagramLet us understand with examples.The tree below is continuous as absolute ...

Read More

Content Management Systems An Overview

Sunidhi Bansal
Sunidhi Bansal
Updated on 03-Aug-2020 4K+ Views

If we go by the term Content Management System word to word, then it basically means a system of managing the content. It is defined as a collaborative platform with different features and functionalities that allow the creating, designing, publishing and maintaining web content easily and effectivelWhat is a Content Management System (CMS)?A Content Management System is a software application used to create and design the web content online. It allows the users to manage the digital content easily by providing access to features like database handling, smart reporting, archiving, designing and animation features etc. These are generally used in ...

Read More

Construct Turing machine for L = {an bm a(n+m) - n,m≥1} in C++

Sunidhi Bansal
Sunidhi Bansal
Updated on 03-Aug-2020 3K+ Views

Turing Machine − A Turing machine is a device used to accept words of a language generated by type 0 grammars. A Turing Machine (TM) is a mathematical model which consists of an infinite length tape divided into cells on which input is given. It consists of a head which reads the input tape. A state register stores the state of the Turing machine. After reading an input symbol, it is replaced with another symbol, its internal state is changed, and it moves from one cell to the right or left. If the TM reaches the final state, the input ...

Read More

How to skip a selected test from execution in pytest?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 593 Views

We can skip a selected test from execution in pytest. Pytest is a test framework in python. To install pytest, we need to use the command pip install pytest. After installation, we can verify if python has been installed by the command pytest –version. The version of pytest shall be known.Pytest can be used for creating and executing test cases. It can be used in wide range testing API, UI, database and so on. The test file of pytest has a naming convention that it starts with test_ or ends with _test keyword and every line of code should be ...

Read More

How to run a test method without reporting as passed or failed in pytest?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 478 Views

We can run a test method without reporting as passed or failed in pytest. This test method is generally used as a prerequisite. Pytest is a test framework in python. To install pytest, we need to use the command pip install pytest. After installation, we can verify if python has been installed by the command pytest – version. The version of pytest shall be known.Pytest can be used for creating and executing test cases. It can be used in wide range testing API, UI, database and so on. The test file of pytest has a naming convention that it starts ...

Read More

How to create a worksheet and write some values in it in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 1K+ Views

We can create a worksheet and then write some values in it. Excel is a spreadsheet which is saved with the .xlsx extension. An excel workbook has multiple sheets and each sheet consists of rows and columns.Out of all the worksheets, while we are accessing a particular sheet that is called as an active sheet. Each cell inside a sheet has a unique address which is a combination of row and column numbers.The column number starts from alphabetic character A and row number starts from the number 1. A cell can contain numerous types of values and they are the ...

Read More

How to get all the values of a particular column based on a condition in a worksheet in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 882 Views

We can get all the values of a particular column based on a condition in a worksheet in Selenium. Excel is a spreadsheet which is saved with the .xlsx extension. An excel workbook has multiple sheets and each sheet consists of rows and columns.Out of all the worksheets, while we are accessing a particular sheet that is called as an active sheet. Each cell inside a sheet has a unique address which is a combination of row and column numbers.The column number starts from alphabetic character A and row number starts from the number 1. A cell can contain numerous ...

Read More

How to get all the values of a particular row based on a condition in a worksheet in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 1K+ Views

We can get all the values of a particular row based on a condition in a worksheet in Selenium. Excel is a spreadsheet which is saved with the .xlsx extension. An excel workbook has multiple sheets and each sheet consists of rows and columns.Out of all the worksheets, while we are accessing a particular sheet that is called as an active sheet. Each cell inside a sheet has a unique address which is a combination of row and column numbers.The column number starts from alphabetic character A and row number starts from the number 1. A cell can contain numerous ...

Read More
Showing 51781–51790 of 61,297 articles
Advertisements