## Python | Sort a List according to the Length of the Elements

In this program, we need to accept a list and sort it based on the length of the elements present within. Examples: Input : list… Read More »

In this program, we need to accept a list and sort it based on the length of the elements present within. Examples: Input : list… Read More »

Given a number n, find the n-th term in the series 1, 3, 6, 10, 15, 21… Examples: Input : 3 Output : 6 Input… Read More »

Here we are going to find the sum of the series 1 + 11 + 111 + 1111 +…..upto N terms (where N is given).… Read More »

Prerequisite : Anonymous function In the program below, we have used anonymous (lambda) function inside the map() built-in function to find the powers of 2.… Read More »

Given an array of n-elements. Given array is a permutation of some Arithmetic Progression. Find the minimum number of De-arrangements present in that array so… Read More »

Given a number n, check if it is divisible by 17 using bitwise operators. Examples: Input : n = 34 Output : 34 is divisible… Read More »

This is a mathematical series program where a user must enter the number of terms up to which the sum of the series is to… Read More »

Given two strings X and Y consisting of only digits ‘0’ to ‘9’. Find minimum cost required to make the given two strings identical. Only… Read More »

Introduction to Identity Matrix : The dictionary definition of an Identity Matrix is a square matrix in which all the elements of the principal or… Read More »

What is a superellipse A superellipse, also known as a Lamé curve after Gabriel Lamé, is a closed curve resembling the ellipse, retaining the geometric… Read More »

We are given a matrix that contains different values in its each cell. Our aim is to find the minimal set of positions in the… Read More »

This is an extended version of subset sum problem. Here we need to find size of maximum size subset whose sum is equal to given… Read More »

Given series 1 2 2 3 3 3 4 4 4 4 …., find n-th term of the series. The “pattern” is obvious. There is… Read More »

Given an array, write functions to find minimum and maximum elements in it. Output: Minimum element of array: 1 Maximum element of array: 1234 Time… Read More »

Given an array and two numbers x and k. Find the number of different ordered pairs of indexes (i, j) such that a[j] >= a[i]… Read More »