Ad
  • Default User Avatar

    The worst case (when string cantains only vowels) has quadratic comlexity (erase can be linear because every char with higher index has to copied to index one less)

  • Default User Avatar

    You cannot store it in one variable, "nnnnnwwwww" doesnt work (returns true) - you need two vars at least

  • Default User Avatar

    It will be slow (due to hashing - actually you are hashing two times "dic.ContainsKey(upperText[i])" and "result += dic[upperText[i]]", and concating of strings - every time you are adding two string together a new instance of string is created and that two strings are copied to the new one). Memory overhead of dictionary is quite big for such small structure. Less powerful tool is better to use in this case - such as array...

  • Default User Avatar

    I think that it will throw IndexOutOfBoundsEx when "something_" is passed
    However I have same solution...