Question: a company changes passwords for its system every month by rotating the previous months password by a certain number of characters. However errors may occur

a company changes passwords for its system every month by rotating the previous months password by a certain number of characters. However errors may occur resulting in a new password that isin't a valid rotation of the old one. The security analysts of the company nedd to figure out how many minimum rotations on which direction (left or right) are needed to change the old password into a new password. Help them determine the minimum number of rotations along with the direction of rotation needed to changethe old password into new password.Given two words representing old_password and new_password. If the number of left rotations are equal to the right rotations then print only the number of rotations. Otherwise print the minimum number of rotations along withthe direction of rotation.If the new_password is not a valid rotation of old_password print false.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!