Compare Version Numbers | September leetcode challenge Day 9 | Leetcode 165

preview_player
Показать описание

Quick Links
1) 0:00 Understanding the problem
2) 0:53 Walkthrough of the algorithm with example
5) 6:12 Coding it up
6) 10:40 Analysing the time complexity

Time complexity O(n) where n is the no of elements in the version part
Space complexity O(1)

Solution
Рекомендации по теме
Комментарии
Автор

In split method the string is converted to a regular expression.
" . "is the special character matching all input characters. As with any regular expression special character, we escape with a \. we need an additional \ for the Java string escape.

src : stackoverflow

_heenaahmed
visit shbcf.ru