Ad
  • Custom User Avatar

    Being strict, for very long strings this will take O(nlogn); I've used an array of booleans and I set an element to true if its character is found. At the end my solution is O(n). Please take a look at let me know what you think :)