Ad
  • Default User Avatar

    Yeah but it's not very efficient as it uses for loops. See my solution. BTW I had initially came up with this solution but I improved before submitting.