# Category - Mathematical Algorithms

## C++ Programming – Program for Newton Raphson Method

C++ Programming - Program for Newton Raphson Method - Mathematical Algorithms - Given a function f(x) on floating number x and an initial guess for root

## C++ Programming – Program for Method Of False Position

C++ Programming - Program for Method Of False Position - Mathematical Algorithms - Given a function f(x) on floating number x and two numbers ‘a’ and ‘b’

## C++ Programming – Program for Bisection Method

C++ Programming - Program for Bisection Method - Mathematical Algorithms - The method is also called the interval halving method, the binary search method

## C++ Programming – number of contiguous subsequences

C++ Programming number of contiguous subsequences - Mathematical Algorithms - Given a number as a string, write a function to find the number of substrings

## C++ Programming – Print first k digits of 1/n where n is a positive integer

C++ Programming- Print first k digits of 1/n where n is a positive integer- Mathematical Algorithms - Given a positive integer n, print first k digits

## C++ Programming – Program to add two polynomials

C++ Programming - Program to add two polynomials - Mathematical Algorithms - Addition is simpler than multiplication of polynomials. We initialize result

## C Programming – Replace all ‘0’ with ‘5’ in an input Integer

C Programming - Replace all ‘0’ with ‘5’ in an input Integer - Mathematical Algorithms - The idea is simple, we get the last digit using mod operator ‘%’.

## Java Programming – Count ways to reach the n stair

Java Programming - Count ways to reach the n stair - Mathematical Algorithms - The time complexity of above solution is exponential.

## C Programming – Count ways to reach the n stair

C Programming - Count ways to reach the n stair - Mathematical Algorithms - There are n stairs, a person standing at the bottom wants to reach the top.

## C++ Programming – Count Distinct Non-Negative Integer Pairs (x, y)

C++ Programming - Count Distinct Non-Negative Integer Pairs (x, y) - Mathematical Algorithms - A Simple Solution is to run two loops. The outer loop

X