Sudhir sharma has Published 1082 Articles

Binary representation of previous number in C++

sudhir sharma

sudhir sharma

Updated on 09-Jul-2020 11:40:57

353 Views

In this problem, we are given the binary representation of a number and we have to find the binary representation of the previous number i.e. the number that is resulted after subtracting one from the given number.Binary representation of a number is changing the base of the number to base ... Read More

Bakhshali Approximation for computing square roots in C program

sudhir sharma

sudhir sharma

Updated on 09-Jul-2020 05:52:06

779 Views

Bakhshali approximation is a method of computing the square root of a number which is not a perfect square. Now, lets brush-related terms to easily understand the concept.Square root of a number x is a number that satisfies the following condition, y2 = x.Perfect Square is a number whose square ... Read More

Balance pans using given weights that are powers of a number in C++ program

sudhir sharma

sudhir sharma

Updated on 09-Jul-2020 05:51:39

228 Views

STATEMENT − Balance pans using given weights that are powers of a number.DESCRIPTION − In this problem we are given a pan based weighing machine. we are given a weight T and some other weights whose values are powers of a number a. We need to balance the pans using ... Read More

C++ Balanced expression with replacement

sudhir sharma

sudhir sharma

Updated on 09-Jul-2020 05:51:04

456 Views

A balanced expression of parentheses is an expression that contains pairs of all sort of parentheses together in a correct order.this means that for every opening parentheses there is a closing parentheses in proper order of parentheses i.e. { }.let's take a few examples to understand the concept better −Expression ... Read More

How to convert hex string to byte Array in Java?

sudhir sharma

sudhir sharma

Updated on 03-Jul-2020 08:12:11

6K+ Views

We can convert a hex string to byte array in Java by first converting the hexadecimal number to integer value using the parseInt() method of the Integer class in java. This will return an integer value which will be the decimal conversion of hexadecimal value. We will then use the ... Read More

A Number Link Game?

sudhir sharma

sudhir sharma

Updated on 02-Jul-2020 05:37:51

856 Views

Number link is a type of logic puzzle involving finding paths to connect numbers in a grid.A simple example of a Numberlink puzzle The solution to the Numberlink puzzleRules − The player has to pair up all the matching numbers on the grid with single continuous lines (or paths). The ... Read More

Add all greater values to every node in a given BST?

sudhir sharma

sudhir sharma

Updated on 01-Jul-2020 14:57:28

292 Views

A BST or binary search tree is a form of binary tree that has all left nodes smaller and all right nodes greater than the root value. For this problem, we will take a binary tree and add all the values greater than the current node to it. the problem ... Read More

C Program to Multiply two Floating Point Numbers?

sudhir sharma

sudhir sharma

Updated on 01-Jul-2020 11:36:53

846 Views

Float is a shortened term for "floating-point." By definition, it's a fundamental data type built into the compiler that's used to define numeric values with floating decimal points. A floating-point type variable is a variable that can hold a real number, such as 4320.0, -3.33, or 0.01226. The floating part ... Read More

Write a C program to print “ Tutorials Point ” without using a semicolon

sudhir sharma

sudhir sharma

Updated on 01-Jul-2020 11:29:03

315 Views

To print any string without using a semicolon we need to find how the standard output work and why is semicolon used.The semicolon is a end of line statement that is used to tell the program that the line is ended here. The standard print statement printf used here is ... Read More

Sum of first n natural numbers in C Program

sudhir sharma

sudhir sharma

Updated on 01-Jul-2020 11:08:28

1K+ Views

The concept of finding the sum of sum of integers is found such that first, we will find the sum of numbers up to n and then add all the sums to get a value which will be the sum of sum which is our desired sum.For this problem, we ... Read More

Advertisements