# Tag Archives: rotation

Given an integer array arr[]. Create a new array which is a rotation of given array and find the maximum Hamming distance between both the… Read More
Given a sorted array arr[] of the first N Natural Numbers and an integer X, the task is to print the last remaining element after… Read More
Given two 2D matrices mat[][] and T[][] of size M×N and P×Q respectively. The task is to check whether the matrix T[][] is a result… Read More
Given a rectangular matrix mat[][] with N rows and M columns, the task is to rotate the matrix by 90 degrees in a clockwise direction… Read More
Given a square matrix mat[][] of dimension N and an integer K, the task is to rotate the matrix by 90 degrees K times without… Read More
Given a binary string S of size N, the task is to maximize the sum of the count of consecutive 0s present at the start… Read More
Given a matrix mat[][] of dimensions M * N, the task is to print the matrix obtained after rotating every ith row of the matrix… Read More
Given an array arr[] of size N, the task is to find the maximum difference between the sum of the prime numbers and the sum… Read More
Given a string S containing lowercase English alphabets, and a matrix shift[][] consisting of pairs of the form{direction, amount}, where the direction can be 0… Read More
Given an array arr[] of size N (consisting of duplicates), the task is to check if the given array can be converted to a non-decreasing… Read More
Given a positive integer N, the task is to find the maximum value among all the rotations of the digits of the integer N. Examples:… Read More
Given an array arr[] of size N, the task is to check if it is possible to convert all of the array elements to a… Read More
Given an array arr[] consisting of N positive integers, the task is to rotate the digits of array elements in an anti-clockwise direction such that… Read More
Given two integers N and K, the task is to rotate the digits of N by K. If K is a positive integer, left rotate… Read More
Given an array arr[] consisting of N integers, the task is to sort the array in non-increasing order by minimum number of anti-clockwise rotations. If… Read More