Sudhir sharma has Published 1206 Articles

C/C++ Program to the Count set bits in an integer?

sudhir sharma

sudhir sharma

Updated on 19-Aug-2019 07:43:40

145 Views

Counting set bits means counting 1’S of the given integer. For this, we have multiple solutions that can be applied. For this case, we have a binary number( binary representation of an integer), for which we have to count the number of 1’s off the string.To count the number of ... Read More

C/C++ Program to Count number of binary strings without consecutive 1’s?

sudhir sharma

sudhir sharma

Updated on 19-Aug-2019 07:42:24

198 Views

A binary number is a number that contains only two i.e. has one or two. Every binary number is A stream of binary bit, and we consider this as a binary string. for this string, we need to find the number of binary string that does not contain consecutive ones ... Read More

C/C++ Program to the Count Inversions in an array using Merge Sort?

sudhir sharma

sudhir sharma

Updated on 19-Aug-2019 07:40:46

215 Views

The Count of inversions that take place to Sort the given array is known as inversion count. the inversion problem is a classical problem that can be solved using the merge sort Algorithm. in this problem v we will count all elements more than it to its left and add ... Read More

C/C++ Program to check whether it is possible to make the divisible by 3 number using all digits in an array?

sudhir sharma

sudhir sharma

Updated on 19-Aug-2019 07:35:15

273 Views

To check whether a number is divisible by 3, we add all the digits of the number and then calculate that the sum is divisible by 3 or not. In this problem, there is an array of integers arr[], and we have to check if a number formed with these ... Read More

C/C++ Program for the Triangular Matchstick Number?

sudhir sharma

sudhir sharma

Updated on 19-Aug-2019 07:33:21

155 Views

A triangle that is made by using matchsticks arrange to make an equilateral triangle, this is called the triangular matchstick number. Triangular matchstick number is the number of matchsticks required to make the matchstick triangle.In this problem, we have the number is the floor of a matchstick pyramid, X. and ... Read More

C/C++ Program for the Odd-Even Sort (Brick Sort)?

sudhir sharma

sudhir sharma

Updated on 19-Aug-2019 07:26:35

359 Views

The odd-even sword also known as the brick sort is a similar sorting technique, like bubble sort. This sorting technique is subdivided into 2 phases odd phase and even phase, Both these phases simultaneously at every iteration until all the elements get sorted.The Odd phase of this programming technique works ... Read More

C/C++ Program for Number of solutions to the Modular Equations?

sudhir sharma

sudhir sharma

Updated on 19-Aug-2019 07:24:21

305 Views

In mathematics, a modular equation is an algebraic equation satisfied by moduli, in the sense of moduli problem. That is, given a number of functions on a moduli space, a modular equation is an equation holding between them, or in other words an identity for moduli.The most frequent use of ... Read More

C/C++ Program for Number of solutions to Modular Equations?

sudhir sharma

sudhir sharma

Updated on 19-Aug-2019 07:17:42

80 Views

We have an n number of coins and we have to French the coin way that it makeup Pyramid of maximum height. We will arrange the first coin in First row second and third coin in the second row and so onIn the given diagram, we make pyramid 6 of ... Read More

C/C++ Program for Finding the vertex, focus and directrix of the parabola?

sudhir sharma

sudhir sharma

Updated on 19-Aug-2019 07:14:05

283 Views

A set of points on a plain surface that forms a curve such that any point on that curve is equidistant from a point in the center (called focus) is a parabola.The general equation for the parabola isy = ax2 + bx + cThe vertex of a parabola is the ... Read More

Addition of two number using ‘-‘ operator?

sudhir sharma

sudhir sharma

Updated on 16-Aug-2019 12:05:43

3K+ Views

Operator overloading is an important concept in C++. It is a type of polymorphism in which an operator is overloaded to give user-defined meaning to it. The overloaded operator is used to perform the operation on the user-defined data type. For example, '+' operator can be overloaded to perform addition ... Read More

Advertisements