Sudhir sharma has Published 1206 Articles

Evaluate an array expression with numbers, + and - in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 13:13:55

211 Views

In this problem, we are given an array arr[] consisting of n character values denoting an expression. Our task is to evaluate an array expression with numbers, + and –. The expression consists of only, numbers, ‘+’ character and ‘- ’ character.Let’s take an example to understand the problem, Input: arr = ... Read More

Evaluation of Prefix Expressions in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 13:13:40

13K+ Views

In this article, we will discuss the evaluation of prefix Expression. Prefix ExpressionIn this notation, operator is prefixed to operands, i.e. operator is written ahead of operands. For example, +ab. This is equivalent to its infix notation a + b. Prefix notation is also known as Polish Notation.For more read.Example:* + ... Read More

Evaluation of Expression Tree in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 13:13:21

888 Views

In this problem, we are given an expression tree that consist of binary operations like +, - , /, *. We need to do the evaluation of the expression tree and then return the result.Expression Tree is a special type of binary tree in which each node either consist of an ... Read More

Euler's Four Square Identity in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 13:07:49

126 Views

In this problem, we are given two numbers and we need to find the product of the numbers using Euler's four square Identity. Euler’s Four Square Identity is the method to find the product of two numbers which can be represented using the sum of four squares of the number if the numbers can ... Read More

Eulerian Number in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 13:07:32

194 Views

In mathematics, the Eulerian number is a special type of combination number. It defines the number of permutations in which the next element is a specific number greater than the previous one.Denoted as,  A(n, m) is permutation from 1 to n in which two numbers vary by m.Problem Statement: In this problem, we ... Read More

Evaluate a boolean expression represented as string in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 13:07:18

584 Views

In this problem, we are given a string exp that represents a boolean expression. Our task is to evaluate the boolean expression represented as String.The valid characters in the expression are −0 or 1 denoting the boolean value& denoting AND operation| denoting OR operation^ denoting XOR operationWe need to solve ... Read More

Euler Method for solving differential equation in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 13:00:01

3K+ Views

In this problem, we are given a differential equation f(x, y) = dy/dx with initial value y(x0) = y0. Our task is to find the solution of the equation using the Euler method for solving differential equations.EULER METHODEuler method also known as forward euler Method is a first order numerical procedure to find ... Read More

Equilibrium index of an array in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 12:59:42

470 Views

In this problem, we are given an array arr[] consisting of n integer values. Our task is to create a program to find the equilibrium index of an array.Equilibrium Index is the index at which the sum of all elements before the index is the same as the sum of all ... Read More

Equidigital Numbers in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 12:59:30

84 Views

Equidigital numbers are mathematically special numbers in which the number of digits in the number is equal to the number in its prime factorization.In this problem, we are given an integer value n. Our task is to create a program to all equidigital numbers up to n.Let’s take an example ... Read More

Equal Sum and XOR in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 12:55:57

733 Views

In this problem, we are given an integer n. Our task is to create a program to find the count of integers from i = 0 to n, where sum is equal to XOR i.e. (n+i) = (n^i).Let’s take an example to understand the problem, Input:  n = 4Output: 4Explanation: Considering all ... Read More

Advertisements