Daily Coding Day One Aught Eight
My Paps used to say aught versus zero so I thought this would be a nice shoutout to the suspenders wearing gent. Another few days another programming problem. This one was marked as easy, but unless you have a good handle on String maniupluation it would be hard.
1 | //This problem was asked by Google. |
I was too lazy to remove the default JSFiddle stuff, but the crux is the concatenation step. By concatenating the first string with itself you get all of the loops and would be able to discern whether the second string is a shifted version of the first. Fun, but one of the worst kinds of interview problems because it is obtuse and there is zero practicality. It can be obtuse OR not practical, but come on…not both.