Today I solved one medium level linkedlist problem on leetcode.
Q:-Remove Nth node from end of list.
In this first I check for 0 or 1 node in linkedlist then return null. After that I used three node reference (slow, fast, prev) that point to the head node.
#DSA#leetcode#Code
Q:- Linked list Cycle Detection.
I solved this problem using two pointer approach in this one pointer monve one step at a time and another pointer Move two steps at a time and check condition if both pointer become equal then return true otherwise return false
#LeetCode#DSA
Q:- Merge two sorted linkedlist.
I try this question yesterday approx 1 hour but I didn't solve it and again today I try to solve but after one hour I run code and passed some test cases but found TLE then I take hint and observe I need a dummy node and add smaller node to this.
Today I solved one linkedlist problem from blind neetcode in starting I feel I can't solve it but I solved it in 33.57 minutes without seeing any hints.
After a long time again strart solving DSA questions and I will try to be consistent.
Q. Reverse the linkedlist
#DSA#code
Har baar aam aadmi hi adjust kyu kare?
Railway delay ka jawabdeh kaun hai?
kisi ka exam chhut raha hai,
kisi ki job interview miss ho rahi hai…
par system ko koi farq nahi padta.
@rail_seva@RailMinIndia@min_rail#railway