Sudhir sharma has Published 1149 Articles

Find mirror of a given node in Binary tree in C++

sudhir sharma

sudhir sharma

Updated on 12-Mar-2021 07:28:27

218 Views

In this problem, we are given a binary tree. Our task is to Find mirror of a given node in the Binary tree. We will be given a node, and find the mirror image of that node in the opposite subtree.Let’s take an example to understand the problem, InputOutputmirror of ... Read More

Find mirror image of a point in 2-D plane in C++

sudhir sharma

sudhir sharma

Updated on 12-Mar-2021 07:24:48

271 Views

In this problem, we are given a point P in a 2-D plane and the points a, b, c of the equation ax + by + c = 0. Our task is to find a mirror image of a point in 2-D plane.Let’s take an example to understand the problem, ... Read More

Find minimum speed to finish all Jobs in C++

sudhir sharma

sudhir sharma

Updated on 12-Mar-2021 07:09:18

194 Views

In this problem, we are given an array arr[] consisting of n elements and an integer h. Each element of the array arr[] contains the number of pending jobs for the person and H is the time left to complete the jobs (in Hours). Our task is to Find minimum ... Read More

Find minimum possible size of array with given rules for removing elements in C++

sudhir sharma

sudhir sharma

Updated on 12-Mar-2021 07:05:04

565 Views

In this problem, we are given an array of n numbers and an integer value k. Our task is to Find minimum possible size of the array with given rules for removing elements.Problem Description − we need to minimise the number of elements in the array. By using the follow ... Read More

Find minimum possible digit sum after adding a number d in C++

sudhir sharma

sudhir sharma

Updated on 12-Mar-2021 07:01:15

233 Views

In this problem, we are given two numbers n and d. Our task is to Find the minimum possible digit sum after adding a number d.Problem Description − we need to minimise the digits sum by adding kth multiple of d to n.Let’s take an example to understand the problem, ... Read More

Find minimum operations needed to make an Array beautiful in C++

sudhir sharma

sudhir sharma

Updated on 12-Mar-2021 06:58:26

584 Views

In this problem, we are given a binary array bin[] consisting n binary values which happen to be 0 and 1. Our task is to find minimum operations needed to make an Array beautiful.Beautiful array is a special type of binary array which consists of a pattern of alternate 0’s ... Read More

Find minimum number of merge operations to make an array palindrome in C++

sudhir sharma

sudhir sharma

Updated on 12-Mar-2021 06:56:17

870 Views

In this problem, we are given an array arr[] consisting of n positive numbers. Our task is to Find minimum number of merge operations to make an array palindrome.Palindrome array are similar to palindrome strings, the elements at index i and n-i should be the same.Example{5, 1, 7, 2, 7, ... Read More

Find minimum in an array without using Relational Operators in C++

sudhir sharma

sudhir sharma

Updated on 12-Mar-2021 06:52:40

203 Views

In this problem, we are given an array arr[] consisting of n positive elements. Our task is to find minimum in an array without using Relational Operators.Relational operators in programming are those operators which are used to check the relationship between two values. Like == (equals), greater than (>), less ... Read More

Find Minimum Depth of a Binary Tree in C++

sudhir sharma

sudhir sharma

Updated on 12-Mar-2021 06:50:39

476 Views

In this problem, we are given a binary tree. Our task is to Find Minimum Depth of a Binary Tree.Binary Tree has a special condition that each node can have a maximum of two children.The minimum depth of a binary tree is the shortest path between the root node to ... Read More

Find middle point segment from given segment lengths in C++

sudhir sharma

sudhir sharma

Updated on 12-Mar-2021 06:46:56

172 Views

In this problem, we are given an array arr[] of size m representing the lengths of line segments.The line segments are from 0 to arr[0] , arr[0] to arr[1] and so on. Our task is to find the segment which is at the middle of all segments.Let’s take an example ... Read More

Advertisements