Quantcast
Channel: rotation– GeeksforGeeks
Browsing index pages (97 articles)

Complete Guide On Array Rotations – Data Structure and Algorithms Tutorial

Rotations in the array is defined as the process of rearranging the elements in an array by shifting each element to a new position. This… Read More The post Complete Guide On Array Rotations – Data...

View Article


Complete Guide On 2D Array (Matrix) Rotations – Data Structure and Algorithms...

Matrix Rotation is defined as rotating the elements of the array around its center in a clockwise or counterclockwise direction, or rotating the elements by… Read More The post Complete Guide On 2D...

View Article


Check if any circular rotation of String has at most X 1s between two...

Given a binary string S of length N and an integer X, the task is to check if there exists a right-wise circular rotation of… Read More The post Check if any circular rotation of String has at most X...

View Article

Minimum flips to make Matrix identical for all rotations

Given a binary matrix Mat[][] of size N*N, the task is to find the minimum number of flips to be performed such that the matrix… Read More The post Minimum flips to make Matrix identical for all...

View Article

Maximum product of first and last character of String after rotation

Given a string S of length N, the task is to find the maximum possible product of the first and the last character of the… Read More The post Maximum product of first and last character of String after...

View Article


Left rotate Linked List by X in groups of Y nodes

Given a singly linked list and two integers X and Y, the task is to left rotate the linked list by X in groups of… Read More The post Left rotate Linked List by X in groups of Y nodes appeared first on...

View Article

Count of possible rotations of given Array to remove largest element from...

Given an array arr[ ] with even length N, the task is to find the number of cyclic shifts (rotations) possible for this array, such… Read More The post Count of possible rotations of given Array to...

View Article

Minimum rotations that have maximum elements with value at most its index

Given an array arr[] of size N, the array can be rotated any number of times such that after rotation, each element of the array… Read More The post Minimum rotations that have maximum elements with...

View Article


Print Array after it is right rotated K times where K can be large or negative

Given an array arr[] of size N and a value K (-10^5<K<10^5), the task is to print the array rotated by K times to the… Read More The post Print Array after it is right rotated K times where K can...

View Article


Python3 Program for Longest subsequence of a number having same left and...

Given a numeric string S, the task is to find the maximum length of a subsequence having its left rotation equal to its right rotation.… Read More The post Python3 Program for Longest subsequence of a...

View Article

C++ Program to Find Mth element after K Right Rotations of an Array

Given non-negative integers K, M, and an array arr[ ] consisting of N elements, the task is to find the Mth element of the array… Read More The post C++ Program to Find Mth element after K Right...

View Article

Java Program to Find Mth element after K Right Rotations of an Array

Given non-negative integers K, M, and an array arr[ ] consisting of N elements, the task is to find the Mth element of the array… Read More The post Java Program to Find Mth element after K Right...

View Article

Python3 Program to Find Mth element after K Right Rotations of an Array

Python3 # Python3 program to implement # the above approach    # Function to return Mth element of # array after k right rotations def… Read More The post Python3 Program to Find Mth element after K...

View Article


Javascript Program to Find Mth element after K Right Rotations of an Array

Given non-negative integers K, M, and an array arr[ ] consisting of N elements, the task is to find the Mth element of the array… Read More The post Javascript Program to Find Mth element after K Right...

View Article

C++ 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 C++ Program to Find the Mth element...

View Article


Java 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 Java Program to Find the Mth element...

View Article

Python3 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 Python3 Program to Find the Mth...

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

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

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
Browsing index pages (97 articles)


Latest Images