Back to Browse

Perform string shifts | Leetcode | String rotation

17.1K views
Premiered Apr 14, 2020
9:33

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

Download

1 formats

Video Formats

360pmp413.2 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Perform string shifts | Leetcode | String rotation | NatokHD