Ad
  • Default User Avatar

    Nice solution !
    If i understand your code correctly , the time complexity of this solution is O(n^2) ?
    1.the main while loop
    2.the if contains method inside the main loop