Rotate String
Easy · Arrays & Strings · about 5 minutes
Asked at Amazon, Google, Meta, Microsoft, Bloomberg.
A *rotation* takes the first character of a string and moves it to the end. Return true if applying some number of rotations (possibly zero) to s produces goal.