You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: solution/1400-1499/1474.Delete N Nodes After M Nodes of a Linked List/README_EN.md
+51-32
Original file line number
Diff line number
Diff line change
@@ -6,35 +6,23 @@
6
6
7
7
<p>Given the <code>head</code> of a linked list and two integers <code>m</code> and <code>n</code>. Traverse the linked list and remove some nodes in the following way:</p>
8
8
9
-
10
-
11
9
<ul>
12
10
<li>Start with the head as the current node.</li>
13
11
<li>Keep the first <code>m</code> nodes starting with the current node.</li>
14
12
<li>Remove the next <code>n</code> nodes</li>
15
13
<li>Keep repeating steps 2 and 3 until you reach the end of the list.</li>
16
14
</ul>
17
15
18
-
19
-
20
16
<p>Return the head of the modified list after removing the mentioned nodes.</p>
21
17
22
-
23
-
24
18
<p><strong>Follow up question:</strong> How can you solve this problem by modifying the list in-place?</p>
0 commit comments