Posts

Showing posts from December, 2021

JUGGLING ALGORITHM IN C++

Image
  Hi coders! Here I am with a problem which is related to a  famous data Structure  Array.  Many of you people definitely have solved the  array rotation problem . There are various methods to rotate an array. So, here is a very efficient algorithm known as  Juggling Algorithm  to rotate an array with some  d elements . This algorithm is based on  GCD (Greatest Common Divisor) or HCF(Highest Common Factor).