✅ [Python/Java/C++] 2 Easy Solutions || Visualized Explanation || Beginner Friendly
Please UPVOTE if you LIKE! \uD83D\uDE01\n step 1: find the middle pointer of the linked list and split the linked list into two halves using slow and fast point
**Please UPVOTE if you LIKE!** \uD83D\uDE01\n* **step 1: find the middle pointer of the linked list and split the linked list into two halves using slow and fast pointers**\n\t```\n\t\t\t\t\t\t\t\t\thead = [1, 2, 3]\n\thead = [1, 2, 3, 4, 5]    =>\n\t\t\t\t\t\t\t\t\tmid  = [4, 5]\n\t```\n* **step 2: reverse the second half**\n\t```\n\thead = [1, 2, 3]\n\tmid  = [4, 5]             =>    mid = [5, 4]\n\t```\n* **step 3: interleaving merge the first half and the reversed second half**\n\t```\n\thead = [1, 2, 3]\n\t\t\t\t\t\t      =>    head = [1, 5, 2, 4, 3]\n\tmid = [5, 4]\n\t```\n\n\n```\nTime  Complexity: O(N)\nSpace Complexity: O(1)\n```\n\n<iframe src="https://leetcode.com/playground/b7s3MeYC/shared" frameBorder="0" width="100%" height="650"></iframe>\n\n**Basic Solution Using Array or Deque and Repeat `pop_left()` and` pop()`**\n```\n# algorithm pseudo code\ndq = [1, 2, 3, 4, 5]\nwhile dq:\n\tdq.pop_left()\n\tif dq: dq.pop()\n```\n\n```\ndq =  [1, 2, 3, 4, 5] =>  dq.pop_left()   =>   1\ndq =     [2, 3, 4, 5] =>  dq.pop()        =>   5\ndq =     [2, 3, 4]    =>  dq.pop_left()   =>   2\ndq =        [3, 4]    =>  dq.pop()        =>   4\ndq =        [3]       =>  dq.pop_left()   =>   3\n```\n\n```\nTime  Complexity: O(N)\nSpace Complexity: O(N)\n```\n<iframe src="https://leetcode.com/playground/iTNS2J3s/shared" frameBorder="0" width="100%" height="450"></iframe>\n\n**If you have any question, feel free to ask. If you like the solution or the explanation, Please UPVOTE!**
[]