split string every nth character

Solutions on MaxInterview for split string every nth character by the best coders in the world