File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 299299 * [ FormatPhoneNumber] ( String/FormatPhoneNumber.js )
300300 * [ GenerateGUID] ( String/GenerateGUID.js )
301301 * [ HammingDistance] ( String/HammingDistance.js )
302+ * [ IsPalindrome] ( String/IsPalindrome.js )
302303 * [ KMPPatternSearching] ( String/KMPPatternSearching.js )
303304 * [ LevenshteinDistance] ( String/LevenshteinDistance.js )
304305 * [ Lower] ( String/Lower.js )
Original file line number Diff line number Diff line change 1010 * Big-O Analysis
1111 * Time Complexity
1212 - O(N) on average and worst case scenario as input is traversed in linear fashion
13- - O(N) on best case scenario, even when input has length of 1, because toString() method takes O(N)
13+ - O(1) on best case scenario if the input already is a string (otherwise toString() method takes O(N))
14+ and the first & last characters don't match, triggering an early return
1415 * Space Complexity
1516 - O(1)
1617*/
You can’t perform that action at this time.
0 commit comments