Given some programming file names, the task is to check if they are valid or not using regular expressions. A valid programming file name follows… Read More
Category Archives: Algorithms
Find the count of numbers between L and R and are coprime with P. Note: Two numbers X and Y are coprime with each other… Read More
Construct a matrix whose each row contains N 1’s and each column contains M 1’s. Examples: Input: N = 3, M = 4Output:1 1 11… Read More
Voter ID card is also known as EPIC (Electors Photo Identity Card). EPIC is an identification proof for Indian citizens over the age of 18.Given… Read More
Given some Phone Numbers, the task is to check if they are valid or not using regular expressions. Rules for the valid phone numbers are: … Read More
Given some words of Gender, the task is to check if they are valid or not using regular expressions. The correct responses can be as… Read More
Given three integers A, B, and C. the task is to find the maximum possible sum of three numbers when you are allowed to perform… Read More
Given 2 arrays arr1[] and arr2[], of size N and M respectively, the task is to find a pair of value (say a and b)… Read More
Given two arrays X[] and Y[] of length N each. You can shift from X[] to Y[] at most once. The task is to output… Read More
Jon and Arya are playing a game. The rules of the game are as follows: They have a single number N initially. Both will play… Read More
Given two strings A and B which are permutations of each other. The task is to find the minimum number of rotations required to delete… Read More
Prerequisite: SORT command in Linux/Unix with examples The SORT command in the Linux operating system is used for sorting. It can be done either for… Read More
Given two integers L and R. Then the task is to output the count of integers X, such that L ≤ X2 ≤ R and… Read More
Given some UPI IDs, the task is to check if they are valid or not using regular expressions. Rules for the valid UPI ID: UPI… Read More
Given two integer arrays A[] and B[] of length N and M respectively, the task is to find the minimum number of operations required such… Read More