Skip to content

Commit

Permalink
Create README - LeetHub
Browse files Browse the repository at this point in the history
  • Loading branch information
YubinShin committed Aug 26, 2024
1 parent f31d401 commit b9cb99f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions 0344-reverse-string/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<h2><a href="https://leetcode.com/problems/reverse-string/">344. Reverse String</a></h2><h3>Easy</h3><hr><div><p>Write a function that reverses a string. The input string is given as an array of characters <code>s</code>.</p>

<p>You must do this by modifying the input array <a href="https://en.wikipedia.org/wiki/In-place_algorithm" target="_blank">in-place</a> with <code>O(1)</code> extra memory.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>
<pre><strong>Input:</strong> s = ["h","e","l","l","o"]
<strong>Output:</strong> ["o","l","l","e","h"]
</pre><p><strong class="example">Example 2:</strong></p>
<pre><strong>Input:</strong> s = ["H","a","n","n","a","h"]
<strong>Output:</strong> ["h","a","n","n","a","H"]
</pre>
<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
<li><code>1 &lt;= s.length &lt;= 10<sup>5</sup></code></li>
<li><code>s[i]</code> is a <a href="https://en.wikipedia.org/wiki/ASCII#Printable_characters" target="_blank">printable ascii character</a>.</li>
</ul>
</div>

0 comments on commit b9cb99f

Please sign in to comment.