Sudhir sharma has Published 1206 Articles

Equalize an array using array elements only in C++

sudhir sharma

sudhir sharma

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

348 Views

In this problem, we are given an array of n elements. Our task is to create a program to count the number of operations to equalize an array using elements only.We need to count the number of adding or subtraction operations that will be performed to make all the elements ... Read More

Equable Shapes in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 12:53:47

111 Views

In this problem, we are given the coordinates of a polygon. Our task is to create a program to check whether the given polygon is equable or not.Equable Shape is the shape whose perimeter is equal to the area of the shape.Let’s take an example to understand the problem, Input: polygon[][] = ... Read More

Enumeration of Binary Trees in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 12:53:31

367 Views

Enumeration of Binary Tree is counting the total number of distinct unlabeled binary trees of a given size (specific number of nodes). In this article, we will create a program to count the number of Binary Trees of n nodes.Based on labeling of nodes of binary tree, it is of two ... Read More

Entringer Number in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 12:49:29

100 Views

Entringer Number is a special number which is equal to the number of permutations of {1, 2, 3, … n+1}, starting with K+1 which is updated by decreasing then increasing the values alternatively.The value of Entringer Number is formulated using, The recurrence relation, E(n, k) = E(n, k-1) + E(n-1, n-k)The ... Read More

Endian order and binary files in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 12:49:11

460 Views

In the binary file and data management, endianness is the sequence of bytes of a digital data inside the computer memory.In computer memory there are two type of endian order, Big-endian system stores the most significant byte of the data.Small-endian systems store the least significant byte of the data.Read More

Emulating a 2-d array using 1-d array in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 12:48:54

233 Views

In this problem, we will understand the conversion of 2-D array to 1-D array. We will see how to store the elements of a 2-D array to a 1-D array.Here, the size of 1-D array is same as the total number of elements in 2-D array which is n*m.In programming ... Read More

Emirp numbers in C++

sudhir sharma

sudhir sharma

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

395 Views

Emirp number is a special type of number that is a prime number whose digits when reversed create another prime number (this prime number is different from the original one).Emirp is the reverse of prime. Some prime numbers that are not emirp are palindromic prime and single digit prime numbers. Some Emirp Numbers are ... Read More

Elo Rating Algorithm in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 12:48:13

477 Views

Elo Rating Algorithm is a rating algorithm used to rank players in competitive games. The ranking of player of the competition is based on ranting which changes based on the performance of the player as follows, For a game between two players of different ratings. Let’s say there are two players ... Read More

Elements to be added so that all elements of a range are present in array in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 12:40:32

71 Views

In this problem, we are given an array arr[] consisting of n number. Our task is to create a program to find the number of elements to be added so that all elements of a range are present in array. Problem Description: Here, we need to find the number of elements that ... Read More

Elements of an array that are not divisible by any element of another array in C++

sudhir sharma

sudhir sharma

Updated on 22-Jan-2021 12:39:53

327 Views

In this problem, we are given two arrays arr1[] and arr2[]. Our task is to create a program to find the elements of an array that are not divisible by any element of another array. Problem Description: Here, we need to find all elements from arr1 that are not divisible by any ... Read More

Advertisements