Skip to content

Commit 77feb6f

Browse files
committed
Create README - LeetHub
1 parent 57499f8 commit 77feb6f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<h2><ahref="https://leetcode.com/problems/middle-of-the-linked-list/">876. Middle of the Linked List</a></h2><h3>Easy</h3><hr><div><p>Given the <code>head</code> of a singly linked list, return <em>the middle node of the linked list</em>.</p>
2+
3+
<p>If there are two middle nodes, return <strong>the second middle</strong> node.</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strongclass="example">Example 1:</strong></p>
7+
<imgalt=""src="https://assets.leetcode.com/uploads/2021/07/23/lc-midlist1.jpg"style="width: 544px; height: 65px;">
8+
<pre><strong>Input:</strong> head = [1,2,3,4,5]
9+
<strong>Output:</strong> [3,4,5]
10+
<strong>Explanation:</strong> The middle node of the list is node 3.
11+
</pre>
12+
13+
<p><strongclass="example">Example 2:</strong></p>
14+
<imgalt=""src="https://assets.leetcode.com/uploads/2021/07/23/lc-midlist2.jpg"style="width: 664px; height: 65px;">
15+
<pre><strong>Input:</strong> head = [1,2,3,4,5,6]
16+
<strong>Output:</strong> [4,5,6]
17+
<strong>Explanation:</strong> Since the list has two middle nodes with values 3 and 4, we return the second one.
18+
</pre>
19+
20+
<p>&nbsp;</p>
21+
<p><strong>Constraints:</strong></p>
22+
23+
<ul>
24+
<li>The number of nodes in the list is in the range <code>[1, 100]</code>.</li>
25+
<li><code>1 &lt;= Node.val &lt;= 100</code></li>
26+
</ul>
27+
</div>

0 commit comments

Comments
(0)