# Category Archives: Python Programs

In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation  Fn = Fn-1 + Fn-2 With seed values  F0 =… Read More
The Fibonacci numbers are the numbers in the following integer sequence.0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……..In mathematical… Read More
Given a binary matrix, find out the maximum size square sub-matrix with all 1s. For example, consider the below binary matrix. Recommended: Please solve it… Read More
Inversion Count for an array indicates – how far (or close) the array is from being sorted. If the array is already sorted, then the… Read More
Write a GetNth() function that takes a linked list and an integer index and returns the data value stored in the node at that index… Read More
Write a function rotate(arr[], d, n) that rotates arr[] of size n by d elements. Example : Input : arr[] = [1, 2, 3, 4,… Read More
Write a function rotate(ar[], d, n) that rotates arr[] of size n by d elements.  Rotation of the above array by 2 will make array… Read More
There are 2 sorted arrays A and B of size n each. Write an algorithm to find the median of the array obtained merging the… Read More
Write an efficient program to count number of 1s in binary representation of an integer. Examples : Input : n = 6 Output : 2… Read More