## Matrix Multiplication

[wpdm_package id=’1153′]

## SAP Labs Coding Interview Question 2

[wpdm_package id=’1400′] Question: You are given a decimal number x as input. If g(x) is defined as number of 1s in the binary representation of…

## Verizon Placement Procedure

We had Verizon placement test at our college. It comprised of 4 rounds. CS, ECE and EEE branches were eligible to attend with a cutoff…

## Infosys Interview Process

During the month of Septeber We attended Infosys On-Campus placements. Infosys had 2 rounds. 1st was the Online test and 2nd was the technical Interview.…

## Samsung R&D Placement Test

We had a placement test for Samsung R&D at our college. The first round was an online test which was 30 minutes long and comprising…

## Check if two Trees are Structurally Similar

[wpdm_package id=’1352′] Algorithm: Use Recursion. If both the trees are NULL, return true. If only one of the trees is NULL return false. Recursively find…

## How to Delete a Tree

[wpdm_package id=’1354′] Algorithm: [sourcecode lang=”cpp”] void DeleteBinaryTree(tree_node *root) { if(!root) return; DeleteBinaryTree(root->left); DeleteBinaryTree(root->right); free(root); } [/sourcecode]

## Check if two Trees are Mirrors of each other

[wpdm_package id=’1359′] Algorithm: Return true if both the trees are empty. Return false if only one of the tree is empty. Return false if root…

## Find the level with Maximum Sum in a Binary Tree

[wpdm_package id=’1361′] Algorithm: [sourcecode lang=”cpp”] int FindLevelWithMaxSum() { tree_node *temp; int level=0, maxLevel=0; std::queue<tree_node *> Q; int currentSum=0, maxSum=0; if(!root) return 0; Q.push(root); Q.push(NULL); while(!Q.empty())…