Ad
  • Default User Avatar

    There's a better solution using the sliding window method so you can do this in linear time and not quadratic.