You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering that the time complexity of this solution is O(n) rather than O(n^2) ? Seems that each letter is visited and output for just once.
Also I'm curious why the 2 functions _buildLine and _buildSpecialLine has a "_" prefix? Is it because they are private methods and this is some kind of a coding convention? Thanks a lot:)
The text was updated successfully, but these errors were encountered:
You are right, i guess it is O(n). And the underline prefix is to follow my old java style from my earlier job - all private methods should be named with underline as prefix. I will fix it later, thank you.
I'm wondering that the time complexity of this solution is O(n) rather than O(n^2) ? Seems that each letter is visited and output for just once.
Also I'm curious why the 2 functions
_buildLine
and_buildSpecialLine
has a "_" prefix? Is it because they are private methods and this is some kind of a coding convention? Thanks a lot:)The text was updated successfully, but these errors were encountered: