There are n pencils, each having l length. Each can write 4 kilometers. After writing 4 kilometers it has l/4 length. One can join 4 pencils which are having l/4 length and Read more →
Recursion
4 postsRecursion is a powerful way of developing algorithms in which the solution of a problem is determined by the solution of one or more identical subproblems. A recursive solution involves two parts: Read more →
In this article, you will learn to print the Fibonacci sequence of first n term. Fibonacci Series generates subsequent number by adding two previous numbers. The first two terms of the Fibonacci Read more →
In this example, you will learn to reverse the given number using these two methods. Examples : Input : 123 Output : 321 Input : 1995 Output : 5991 Approach used : Read more →