Skip to content

Commit f174527

Browse files
authored
Update brain_teasers.md
1 parent beb7580 commit f174527

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

notes/brain_teasers.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Arrays are fundamental data structures that store elements in a contiguous block
3333
### Working with Strings
3434

3535
Strings, being sequences of characters, have a unique set of operations and considerations. Here are some tips and techniques for working with strings:
36+
3637
- Using Tries for efficient string operations is advantageous, particularly for applications like Auto-Complete where prefix matching is needed. Tries, also known as prefix trees, allow for efficient retrieval of strings with a common prefix.
3738
- The immutability of strings in Python means that once a string is created, it cannot be changed. Any operation that seems to modify a string will create a new one instead, leading to increased memory usage if new strings are frequently created.
3839
- Building strings dynamically using the `str.format()` method is beneficial for constructing strings with dynamic content. This method provides a way to substitute placeholders with values, allowing for the creation of complex formatted strings easily.

0 commit comments

Comments
 (0)