Ad
  • Default User Avatar
    1. Use markdown to display code.
    2. Solution needs to use O(n) time. It looks like you have a for loop in a for loop, which if I'm not mistaken is o(n^2^2). Very slow.
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution