Skip to content

GH-215: String in General #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/new-article.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ body:
- Set
- Hash Table
- Tree
- Big-O
- Bitwise
- Sorting
- Searching
- Brute force, Backtracking
- Greedy
- Big-O
- Bitwise
- Range queries (prefix sum)
- Dynamic Programming (Basic)
- Dynamic Programming (Intermediate)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ A data structure is a data organization, management, and storage format that is
<a href="/concepts/general/array/README.md">Array</a>
</li>
<li>
<code>B</code> String
<a href="/concepts/python/string.md"><code>py🐍</code></a>
<code>B</code>
<a href="/concepts/general/string/README.md">String</a>
</li>
<li>
<code>B</code> Linked List
Expand Down
6 changes: 5 additions & 1 deletion concepts/general/array/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Array

*See implementation in* [C++](/concepts/cpp/array/README.md), Java, [Python](/concepts/python/array/README.md), [Typescript](/concepts/typescript/array/README.md)
*See implementation in*
[C++](/concepts/cpp/array/README.md),
Java,
[Python](/concepts/python/array/README.md),
[Typescript](/concepts/typescript/array/README.md)

An array is a data structure that contains a group of elements. Each element can be accessed using an index. The index of the first element is 0, and the index of the last element is the length of the array minus 1.

Expand Down
30 changes: 30 additions & 0 deletions concepts/general/string/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# String

*See implementation in*
C++,
Java,
[Python](/concepts/python/string/README.md),
Typescript

In competitive programming, programmers use strings or arrays to store and manipulate sequences of characters. This data structure is straightforward, fast, and easy to use.

## String Operations

Here are some basic operations that you can perform on strings:

* Initialization: Create a string with given value
* Accessing Characters: Access a character by its index (zero-based)
* Updating Characters: Update a character by its index
* Traversal: Visit all characters of the string
* Length: Get the number of characters in the string
* Substring: Extract a portion of the string
* Comparison: Compare two strings for equality
* Reversal: Reverse the order of characters in the string
* Uppercase: Convert all characters in the string to uppercase
* Lowercase: Convert all characters in the string to lowercase

## 🔗 Further Reading

* [String (computer science)](https://en.wikipedia.org/wiki/String_(computer_science)), wikipedia
* ▶️ [Strings](https://youtu.be/tI_tIZFyKBw?t=5369), CS50
* ▶️ [CS50 Explained 2016 - Week 2 - Strings](https://www.youtube.com/watch?v=XLd2C9bF6_Q&ab_channel=CS50), CS50
File renamed without changes.
2 changes: 1 addition & 1 deletion readme/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ A data structure is a data organization, management, and storage format that is
<a href="/concepts/python/array/README.md">Array</a>
</li>
<li><code>B</code>
<a href="/concepts/python/string.md">String</a>
<a href="/concepts/python/string/README.md">String</a>
</li>
<li>
<code>B</code>
Expand Down