Answer to Question #314880 in Functional Programming for Akash srivastava

Question #314880

Remove Duplicates from doubly linked list

Problem Statement

Given a sorted doubly linked list containing n nodes. Your task is to remove duplicate nodes from the given list.


Example 1:

Input

1<->2<->2-<->3<->3<->4


Output:

1<->2<->3<->4


Example 2:

Input

1<->1<->1<->1


Output

1

Input

User Task:

Since this will be a functional problem, you don't have to take input. You just have to complete the function deleteDuplicates() that takes head node as parameter.


Constraints:

1 <=N <= 10000

1 <= Node. data<= 2*10000

Output

Return the head of the modified list.




0
Service report
It's been a while since this question is posted here. Still, the answer hasn't been got. Consider converting this question to a fully qualified assignment, and we will try to assist. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS