@@ -264,39 +264,39 @@ int main() {
264
264
265
265
<TabItem value="javascript" label="Javascript">
266
266
267
- 1. **Time complexity**: \( O(n)\) , where \(n\) is the length of the input string, as we only iterate through the string once.
268
- 2. **Space complexity**: \( O(1)\) , as we use a fixed amount of extra space for the map and pointers.
267
+ 1. **Time complexity**: $ O(n)$ , where $n$ is the length of the input string, as we only iterate through the string once.
268
+ 2. **Space complexity**: $ O(1)$ , as we use a fixed amount of extra space for the map and pointers.
269
269
3. This makes the approach efficient and suitable for checking strobogrammatic properties in linear time.
270
270
271
271
</TabItem>
272
272
273
273
<TabItem value="typescript" label="TypeScript">
274
274
275
- 1. **Time complexity**: \( O(n)\) , where \(n\) is the length of the input string, as we only iterate through the string once.
276
- 2. **Space complexity**: \( O(1)\) , as we use a fixed amount of extra space for the map and pointers.
275
+ 1. **Time complexity**: $ O(n)$ , where $n$ is the length of the input string, as we only iterate through the string once.
276
+ 2. **Space complexity**: $ O(1)$ , as we use a fixed amount of extra space for the map and pointers.
277
277
3. This makes the approach efficient and suitable for checking strobogrammatic properties in linear time.
278
278
279
279
</TabItem>
280
280
281
281
<TabItem value="python" label="Python">
282
282
283
- 1. Time complexity: \( O(n)\) , where \(n\) is the length of the input string, as we only iterate through the string once.
284
- 2. Space complexity: \( O(1)\) , as we use a fixed amount of extra space for the dictionary and pointers.
283
+ 1. Time complexity: $ O(n)$ , where $n$ is the length of the input string, as we only iterate through the string once.
284
+ 2. Space complexity: $ O(1)$ , as we use a fixed amount of extra space for the dictionary and pointers.
285
285
3. This makes the approach efficient and suitable for checking strobogrammatic properties in linear time.
286
286
287
287
</TabItem>
288
288
289
289
<TabItem value="java" label="Java">
290
290
291
- 1. **Time complexity**: \( O(n)\) , where \(n\) is the length of the input string, as we only iterate through the string once.
292
- 2. **Space complexity**: \( O(1)\) , as we use a fixed amount of extra space for the map and pointers.
291
+ 1. **Time complexity**: $ O(n)$ , where $n$ is the length of the input string, as we only iterate through the string once.
292
+ 2. **Space complexity**: $ O(1)$ , as we use a fixed amount of extra space for the map and pointers.
293
293
3. This makes the approach efficient and suitable for checking strobogrammatic properties in linear time.
294
294
295
295
</TabItem>
296
296
<TabItem value="cpp" label="C++">
297
297
298
- 1. **Time complexity**: \( O(n)\) , where \(n\) is the length of the input string, as we only iterate through the string once.
299
- 2. **Space complexity**: \( O(1)\) , as we use a fixed amount of extra space for the map and pointers.
298
+ 1. **Time complexity**: $ O(n)$ , where $n$ is the length of the input string, as we only iterate through the string once.
299
+ 2. **Space complexity**: $ O(1)$ , as we use a fixed amount of extra space for the map and pointers.
300
300
3. This makes the approach efficient and suitable for checking strobogrammatic properties in linear time.
301
301
302
302
</TabItem>
0 commit comments