🌟 "Best Solution Ever! 🚀 Python, Java, C++, C, JavaScript, Go, C#, Kotlin, TypeScript, Swift 💻🌟"
🧠 IntuitionTo find the middle node of a linked list, we can utilize the two-pointer technique. By moving one pointer (fast) twice as fast as the other (slow), t


## 🧠 Intuition  
To find the middle node of a linked list, we can utilize the **two-pointer technique**. By moving one pointer (`fast`) twice as fast as the other (`slow`), the `slow` pointer will be at the middle node when `fast` reaches the end.

---

## 🔍 Approach  
1. **Initialization**: Start two pointers, `slow` and `fast`, both pointing to the head of the linked list.  
2. **Traversal**: Move `fast` two steps at a time and `slow` one step at a time.  
3. **End Condition**: Stop when `fast` becomes `null` or `fast.next` is `null`.  
4. **Result**: The `slow` pointer will point to the middle node of the linked list.  

---

## 🎨 Dry Run  

### Linked List Example:  
`1 -> 2 -> 3 -> 4 -> 5`  

### Initial State:  
- `slow = 1`  
- `fast = 1`  

### Step-by-Step Process:  
1. **Iteration 1**:  
   - Move `slow` one step: `slow = 2`  
   - Move `fast` two steps: `fast = 3`  

2. **Iteration 2**:  
   - Move `slow` one step: `slow = 3`  
   - Move `fast` two steps: `fast = 5`  

3. **End**:  
   - `fast` cannot move further (`fast.next = null`).  
   - `slow = 3`, which is the middle node.  

---

## 🕰️ Complexity  
- **Time Complexity**: $$O(n)$$ – Each node is visited once.  
- **Space Complexity**: $$O(1)$$ – Only pointers are used.  

---

## 🐍 Python Solution  
```python
class ListNode:
    def __init__(self, val=0, next=None):
        self.val = val
        self.next = next

class Solution:
    def middleNode(self, head: Optional[ListNode]) -> Optional[ListNode]:
        slow = head
        fast = head
        while fast and fast.next:
            fast = fast.next.next  # Move fast two steps
            slow = slow.next  # Move slow one step
        return slow
```
💡 Found this helpful? Hit that **Upvote** to fuel more amazing content! 🚀✨  

---

## ☕ Java Solution  
```java
class ListNode {
    int val;
    ListNode next;
    ListNode(int x) { val = x; }
}

class Solution {
    public ListNode middleNode(ListNode head) {
        ListNode slow = head, fast = head;
        while (fast != null && fast.next != null) {
            fast = fast.next.next; // Move fast two steps
            slow = slow.next; // Move slow one step
        }
        return slow;
    }
}
```
💡 Found this helpful? Hit that **Upvote** to fuel more amazing content! 🚀✨  

---

## 💻 C++ Solution  
```cpp
struct ListNode {
    int val;
    ListNode* next;
    ListNode(int x) : val(x), next(nullptr) {}
};

class Solution {
public:
    ListNode* middleNode(ListNode* head) {
        ListNode* slow = head;
        ListNode* fast = head;
        while (fast != nullptr && fast->next != nullptr) {
            fast = fast->next->next; // Move fast two steps
            slow = slow->next; // Move slow one step
        }
        return slow;
    }
};
```
💡 Found this helpful? Hit that **Upvote** to fuel more amazing content! 🚀✨  

---

## 💡 JavaScript Solution  
```javascript
class ListNode {
    constructor(val = 0, next = null) {
        this.val = val;
        this.next = next;
    }
}

const middleNode = function (head) {
    let slow = head;
    let fast = head;
    while (fast && fast.next) {
        fast = fast.next.next; // Move fast two steps
        slow = slow.next; // Move slow one step
    }
    return slow;
};
```
💡 Found this helpful? Hit that **Upvote** to fuel more amazing content! 🚀✨  

---

## 🐹 Go Solution  
```go
type ListNode struct {
    Val  int
    Next *ListNode
}

func middleNode(head *ListNode) *ListNode {
    slow, fast := head, head
    for fast != nil && fast.Next != nil {
        fast = fast.Next.Next // Move fast two steps
        slow = slow.Next      // Move slow one step
    }
    return slow
}
```
💡 Found this helpful? Hit that **Upvote** to fuel more amazing content! 🚀✨  

---

## 💻 C# Solution  
```csharp
public class ListNode {
    public int val;
    public ListNode next;
    public ListNode(int x) { val = x; }
}

public class Solution {
    public ListNode MiddleNode(ListNode head) {
        ListNode slow = head, fast = head;
        while (fast != null && fast.next != null) {
            fast = fast.next.next; // Move fast two steps
            slow = slow.next; // Move slow one step
        }
        return slow;
    }
}
```
💡 Found this helpful? Hit that **Upvote** to fuel more amazing content! 🚀✨  

---

## 🚀 Kotlin Solution  
```kotlin
class ListNode(var `val`: Int) {
    var next: ListNode? = null
}

class Solution {
    fun middleNode(head: ListNode?): ListNode? {
        var slow = head
        var fast = head
        while (fast != null && fast.next != null) {
            fast = fast.next?.next // Move fast two steps
            slow = slow?.next // Move slow one step
        }
        return slow
    }
}
```
💡 Found this helpful? Hit that **Upvote** to fuel more amazing content! 🚀✨  

---

## 🌐 TypeScript Solution  
```typescript
class ListNode {
    val: number;
    next: ListNode | null;
    constructor(val?: number, next?: ListNode | null) {
        this.val = val ?? 0;
        this.next = next ?? null;
    }
}

function middleNode(head: ListNode | null): ListNode | null {
    let slow: ListNode | null = head;
    let fast: ListNode | null = head;
    while (fast && fast.next) {
        fast = fast.next.next; // Move fast two steps
        slow = slow.next; // Move slow one step
    }
    return slow;
}
```
💡 Found this helpful? Hit that **Upvote** to fuel more amazing content! 🚀✨  

---

## 🍎 Swift Solution  
```swift
class ListNode {
    var val: Int
    var next: ListNode?
    init(_ val: Int, _ next: ListNode? = nil) {
        self.val = val
        self.next = next
    }
}

class Solution {
    func middleNode(_ head: ListNode?) -> ListNode? {
        var slow = head
        var fast = head
        while fast != nil && fast?.next != nil {
            fast = fast?.next?.next // Move fast two steps
            slow = slow?.next // Move slow one step
        }
        return slow
    }
}
```
💡 Found this helpful? Hit that **Upvote** to fuel more amazing content! 🚀✨  

---

Let me know if you'd like further adjustments or more explanations! 😊
['Linked List', 'Two Pointers', 'Python', 'C++', 'Java', 'Python3', 'JavaScript']