This video explains a very interesting and intuitive problem which is to perform string shift operations. We are given an array of queries and we are required to shift a string in the same order of query and return the string. Rotation of string can be both left rotation and rotation and can be present in any sequence. I have started with the bruteforce approach and optimized it twice to achieve an optimal approach for this problem in just O(N) time complexity. CODE LINK is present below. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
CODE LINK: https://gist.github.com/SuryaPratapK/eaef1cda64759328bd005270ebc256e3