Hello readers, today we will discuss printing pascal's triangle using recursion. Pascal's triangle is a triangle where each number is the sum of the two numbers directly above it. We have one of the most interesting Number Patterns in Pascal's Triangle. In this triangle, each row is the power of 11, we have 1 in first row which is 11 raise to the power 0, 11 in second row which is 11 raise to the power 1 and 121 in third row ,which is 11 raise to the power 2, 1331 in fourth row which is 11 raise to the power 3 and so on. It is also a triangular array of binomial coefficients.
This triangle is infinite. because it has no bottom side and the horizontal sum of each row get doubles to the above row and also a sum of each row is the powers of 2.
Comments: Recursion is a method of solving problems by breaking it into smaller and smaller subproblems until you get smallest part which can be solved easily. Recursion function is the function which is calling itself again and again. In th above example I have made a function get_element(), having two arguments, this function is a recursive function, because it is calling itself until the condition satisfy.