The string swapcase() method converts all uppercase characters to lowercase and vice versa of the given string, and returns it. Syntax: string_name.swapcase() Here string_name is… Read More »

#
All Expert Articles

Given a positive integer n. The problem is to print the numbers in the range 1 to n having bits in alternate pattern. Here alternate… Read More »

Granting Privileges We have already learned about how to create user in MySQL using MySQL | create user statement. But using the Create User Statement… Read More »

In Python, the capitalize() method converts the first character of a string to capital (uppercase) letter. If the string has its first character as capital,… Read More »

Given latitude and longitude in degrees find the distance between two points on the earth. Image Source : Wikipedia Examples: Input : Latitude 1: 53.32055555555556… Read More »

What is the probability of 3 students sharing a birthday in a class of 30 students is ________ . (A) 0.0300 (B) 0.7029 (C) 0.5604… Read More »

Given two polynomials, A(x) and B(x), find the product C(x) = A(x)*B(x). In the previous post we discussed the recursive approach to solve this problem… Read More »

You are given an positive integer n as dividend and another number m (form of 2^k), you have to find quotient and remainder without performing… Read More »

Server Virtualization is the partitioning of a physical server into number of small virtual servers, each running its own operating system. These operating systems are… Read More »

Given an array of n-elements, we have to find the largest element among them without using any conditional operator like greater than or less than.… Read More »

Given a non-negative number n. The problem is to unset the last m bits in the binary representation of n. Constraint: 1 <= m <=… Read More »

Given n elements and a ratio r, find the number of G.P. subsequences with length 3. A subsequence is considered GP with length 3 with… Read More »

Given n, find the greatest number which is strictly not more then n and whose binary representation consists of m consecutive ones, then m-1 consecutive… Read More »

Given a list of N numbers, Find two numbers such that the product of the two numbers has the maximum number of factors. Formally given… Read More »

A number is said to be a Peterson number if the sum of factorials of each digit of the number is equal to the number… Read More »

We have to print a pattern where in middle column contains only 1, right side columns contains constant digit which is greater than 1 and… Read More »

Given a 2D array, find the minimum sum submatrix in it. Examples: Input : M[][] = {{1, 2, -1, -4, -20}, {-8, -3, 4, 2,… Read More »

Insert the characters of the string K R P C S N Y T J M into a hash table of size 10. Use the… Read More »

The puzzle game Magnets involves placing a set of domino-shaped magnets (or electrets or other polarized objects) in a subset of slots on a board… Read More »

Given a non-negative number n and two values l and r. The problem is to count the number of set bits in the range l… Read More »