Skip to content

Commit 2c657aa

Browse files
authored
Improved tasks
1 parent fe6a6fd commit 2c657aa

File tree

7 files changed

+78
-0
lines changed

7 files changed

+78
-0
lines changed

LeetCodeNet/G0001_0100/S0002_add_two_numbers/Solution.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ namespace LeetCodeNet.G0001_0100.S0002_add_two_numbers {
66

77
using LeetCodeNet.Com_github_leetcode;
88

9+
/**
10+
* Definition for singly-linked list.
11+
* public class ListNode {
12+
* int val;
13+
* ListNode next;
14+
* ListNode() {}
15+
* ListNode(int val) { this.val = val; }
16+
* ListNode(int val, ListNode next) { this.val = val; this.next = next; }
17+
* }
18+
*/
919
public class Solution {
1020
public ListNode AddTwoNumbers(ListNode l1, ListNode l2) {
1121
ListNode dummyHead = new ListNode(0);

LeetCodeNet/G0001_0100/S0019_remove_nth_node_from_end_of_list/Solution.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ namespace LeetCodeNet.G0001_0100.S0019_remove_nth_node_from_end_of_list {
66

77
using LeetCodeNet.Com_github_leetcode;
88

9+
/**
10+
* Definition for singly-linked list.
11+
* public class ListNode {
12+
* public int val;
13+
* public ListNode next;
14+
* public ListNode(int val=0, ListNode next=null) {
15+
* this.val = val;
16+
* this.next = next;
17+
* }
18+
* }
19+
*/
920
public class Solution {
1021
private int n;
1122

LeetCodeNet/G0001_0100/S0021_merge_two_sorted_lists/Solution.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ namespace LeetCodeNet.G0001_0100.S0021_merge_two_sorted_lists {
77

88
using LeetCodeNet.Com_github_leetcode;
99

10+
/**
11+
* Definition for singly-linked list.
12+
* public class ListNode {
13+
* public int val;
14+
* public ListNode next;
15+
* public ListNode(int val=0, ListNode next=null) {
16+
* this.val = val;
17+
* this.next = next;
18+
* }
19+
* }
20+
*/
1021
public class Solution {
1122
public ListNode MergeTwoLists(ListNode l1, ListNode l2) {
1223
ListNode list = new ListNode(-1);

LeetCodeNet/G0001_0100/S0023_merge_k_sorted_lists/Solution.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ namespace LeetCodeNet.G0001_0100.S0023_merge_k_sorted_lists {
66

77
using LeetCodeNet.Com_github_leetcode;
88

9+
/**
10+
* Definition for singly-linked list.
11+
* public class ListNode {
12+
* public int val;
13+
* public ListNode next;
14+
* public ListNode(int val=0, ListNode next=null) {
15+
* this.val = val;
16+
* this.next = next;
17+
* }
18+
* }
19+
*/
920
public class Solution {
1021
public ListNode MergeKLists(ListNode[] lists) {
1122
if (lists.Length == 0) {

LeetCodeNet/G0001_0100/S0024_swap_nodes_in_pairs/Solution.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ namespace LeetCodeNet.G0001_0100.S0024_swap_nodes_in_pairs {
66

77
using LeetCodeNet.Com_github_leetcode;
88

9+
/**
10+
* Definition for singly-linked list.
11+
* public class ListNode {
12+
* public int val;
13+
* public ListNode next;
14+
* public ListNode(int val=0, ListNode next=null) {
15+
* this.val = val;
16+
* this.next = next;
17+
* }
18+
* }
19+
*/
920
public class Solution {
1021
public ListNode SwapPairs(ListNode head) {
1122
if (head == null) {

LeetCodeNet/G0001_0100/S0025_reverse_nodes_in_k_group/Solution.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ namespace LeetCodeNet.G0001_0100.S0025_reverse_nodes_in_k_group {
66

77
using LeetCodeNet.Com_github_leetcode;
88

9+
/**
10+
* Definition for singly-linked list.
11+
* public class ListNode {
12+
* public int val;
13+
* public ListNode next;
14+
* public ListNode(int val=0, ListNode next=null) {
15+
* this.val = val;
16+
* this.next = next;
17+
* }
18+
* }
19+
*/
920
public class Solution {
1021
public ListNode ReverseKGroup(ListNode head, int k) {
1122
if (head == null || head.next == null || k == 1) {

LeetCodeNet/G0501_0600/S0543_diameter_of_binary_tree/Solution.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@ namespace LeetCodeNet.G0501_0600.S0543_diameter_of_binary_tree {
66

77
using LeetCodeNet.Com_github_leetcode;
88

9+
/**
10+
* Definition for a binary tree node.
11+
* public class TreeNode {
12+
* public int val;
13+
* public TreeNode left;
14+
* public TreeNode right;
15+
* public TreeNode(int val=0, TreeNode left=null, TreeNode right=null) {
16+
* this.val = val;
17+
* this.left = left;
18+
* this.right = right;
19+
* }
20+
* }
21+
*/
922
public class Solution {
1023
private int diameter;
1124

0 commit comments

Comments
 (0)