Quantcast
Channel: rotation– GeeksforGeeks
Browsing all 97 articles
Browse latest View live

Maximum value possible by rotating digits of a given number

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 The post Maximum value possible by rotating digits of a...

View Article



Modify given array to a non-decreasing array by rotation

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 The post Modify given array to a non-decreasing array...

View Article

Modify a string by performing given shift operations

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 The post Modify a string by...

View Article

Maximize difference between sum of prime and non-prime array elements by left...

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 The post Maximize difference between sum of prime and non-prime...

View Article

Modify a matrix by rotating ith row exactly i times in clockwise direction

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 The post Modify a matrix by rotating...

View Article


Maximum number of 0s placed consecutively at the start and end in any...

Given a binary string S of size N, the task is to maximize sum of count of consecutive 0s present at the start and end… Read More The post Maximum number of 0s placed consecutively at the start and end...

View Article

Rotate all Matrix elements except the diagonal K times by 90 degrees in...

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 The post Rotate all Matrix elements except the diagonal K times...

View Article

Javascript Program For Counting Rotations In Sorted And Rotated Linked List

Given a linked list of n nodes which is first sorted, then rotated by k elements. Find the value of k. Recommended: Please try your… Read More The post Javascript Program For Counting Rotations In...

View Article


Java Program to Count rotations in sorted and rotated linked list

Given a linked list of n nodes which is first sorted, then rotated by k elements. Find the value of k. Recommended: Please try your… Read More The post Java Program to Count rotations in sorted and...

View Article


C++ Program to Count rotations in sorted and rotated linked list

Given a linked list of n nodes which is first sorted, then rotated by k elements. Find the value of k. Recommended: Please try your… Read More The post C++ Program to Count rotations in sorted and...

View Article

Javascript Program for Minimum move to end operations to make all strings equal

Given n strings that are permutations of each other. We need to make all strings same with an operation that takes front character of any… Read More The post Javascript Program for Minimum move to end...

View Article

Python3 Program for Minimum move to end operations to make all strings equal

Given n strings that are permutations of each other. We need to make all strings same with an operation that takes front character of any… Read More The post Python3 Program for Minimum move to end...

View Article

Java Program for Minimum move to end operations to make all strings equal

Given n strings that are permutations of each other. We need to make all strings same with an operation that takes front character of any… Read More The post Java Program for Minimum move to end...

View Article


C++ Program for Minimum move to end operations to make all strings equal

Given n strings that are permutations of each other. We need to make all strings same with an operation that takes front character of any… Read More The post C++ Program for Minimum move to end...

View Article

Minimum number of rotations required to convert given Matrix to another

Given two 2D arrays arr[][] and brr[][] of equal size. The task is to find the minimum number of rotations required either clockwise or anticlockwise… Read More The post Minimum number of rotations...

View Article


Right rotate given Array K times using Pointers

Given an array arr[] of size N and an integer K, the task is to right rotate the array K times. Examples:  Input: arr[] =… Read More The post Right rotate given Array K times using Pointers appeared...

View Article

Minimize number of rotations on array A such that it becomes equal to B

Given arrays, A[] and array B[] of size N, the task is to minimize the number of rotations (left or right) on A such that… Read More The post Minimize number of rotations on array A such that it...

View Article


Count of iterations to make minimum as 0 by rotating Array followed by...

Given an array arr[]. The task is to find the number of iterations required to make the minimum element in the array as 0. In… Read More The post Count of iterations to make minimum as 0 by rotating...

View Article

C++ Program to Count of Array elements greater than all elements on its left...

Given an array A[ ] consisting of N distinct integers, the task is to find the number of elements which are strictly greater than all… Read More The post C++ Program to Count of Array elements greater...

View Article

Javascript Program to Find the Mth element of the Array after K left rotations

Given non-negative integers K, M, and an array arr[] with N elements find the Mth element of the array after K left rotations. Examples: Input:… Read More The post Javascript Program to Find the Mth...

View Article
Browsing all 97 articles
Browse latest View live




Latest Images