Leetcode 2095 Delete the Middle Node of a Linked List | Coding Decoded SDE Sheet

preview_player
Показать описание
Here is the solution to "Delete the Middle Node of a Linked List" leetcode question. Hope you have a great time going through it.

🔴 Connect with me here:
------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------
Master Data Structures and algorithms 🔽🔽🔽🔽

🔥🔥🔥🔥👇👇👇 For discussion/feedback/humour/doubts/new openings

🔴 Checkout the series:

✨ Hashtags ✨
#CodingDecoded #ProductBased #SoftwareEngineering #FAANGM #FAANG #NSIT #NSUT #engineering #internship #college #Freshers #amazon #apple #coding #algorithms #programming #LearnCoding​ #CodingPractice #leetcode #college #Jee #engineering #leetcode #UseLeetcodeEffectively #dailychallenge
#CareerSwami #Freshers #lifeatmicrosoft #microsoft #softwareengineering #lifeatoci #ocicompensation #ocisalary #softwareengineeringexperience
#dsa #coding #gate #coding #jeemains #iit #jeemains2022 #inspiration #india #firstvlog #motivation
#dsa #datastructure #dsapatterns #google #amazon #amazonsde #softwareengineering #codinginterview #codinginterviewquestions #binarysearch

#microfrontends #frontenddeveloper #softwareengineer

#recession #layoffs #SoftwareIndustry
Рекомендации по теме
Комментарии
Автор

today i was able to slove it on my own 😀

Harjotse
Автор

we can do this without any extra pointer apart from slow and fast.
Here is my approach :
i) check head->next == NULL return head;
ii) slow = head, fast = head->next->next;
iii) do simple while slow +=1, fast +=2
iv) after the loop end make a new connection slow->next = slow->next->next;
Time and space Complexity will be same as O(n) for TC and for SP- O(1)

codewithnadeem
Автор

Bro please if possible try to make playlist of videos topic wise...as it will be easy to navigate and would be of great help for students like great video❤👍

bhaveshgavali
welcome to shbcf.ru