We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b78e47 commit 554c9c2Copy full SHA for 554c9c2
lib/src/medium/8.string_to_integer_atoi/main.dart
@@ -1,3 +1,10 @@
1
+/// The time complexity of the function is `O(n)`,
2
+/// where `n` is the length of the input string.
3
+/// The function also handles edge cases such as
4
+/// leading/trailing whitespace, signs, and overflow.
5
+/// The space used is constant and does not depend
6
+/// on the length of the input string.
7
+
8
class Solution {
9
int myAtoi(String s) {
10
s = s.trim();
0 commit comments