[go: up one dir, main page]

0% found this document useful (0 votes)
21 views4 pages

Practice Questions For Mid-Term (ADS-2)

The document outlines various problems related to singly linked lists, including finding intersections, deleting nodes, detecting cycles, reversing lists, and checking for palindromes. Each problem is categorized by difficulty level and includes links to relevant resources for further information. The document serves as a guide for solving common linked list challenges in programming.

Uploaded by

Yash Manral
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views4 pages

Practice Questions For Mid-Term (ADS-2)

The document outlines various problems related to singly linked lists, including finding intersections, deleting nodes, detecting cycles, reversing lists, and checking for palindromes. Each problem is categorized by difficulty level and includes links to relevant resources for further information. The document serves as a guide for solving common linked list challenges in programming.

Uploaded by

Yash Manral
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Questions

Intersection of Two Linked Lists


Delete Node in a Linked List
Delete a Node from given position
Merge Two Sorted Lists
Linked List Cycle
Reverse Linked List
Create a singly linked list and then reverse it
Palindrome Linked List
Delete the Middle Node of a Linked List
Insert a node at given position
Swap Nodes in Pairs
Rotate Singly linked list
Problem Statement Difficulty level

Given the heads of two singly linked-lists headA and


headB, return the node at which the two lists intersect. If Easy
the two linked lists have no intersection at all, return null.
Delete a node in a linked list Medium

Delete a node from given position Easy

Given head, the head of a linked list, determine if the linked list
has a cycle in it.
There is a cycle in a linked list if there is some node in the list
that can be reached again by continuously following the next
pointer. Internally, pos is used to denote the index of the node Easy
that tail's next pointer is connected to. Note that pos is not
passed as a parameter.
Return true if there is a cycle in the linked list. Otherwise, return
false.
Given the head of a singly linked list, reverse the list, and
Easy
return the reversed list.
Given a linked list, swap every two adjacent nodes and
return its head. You must solve the problem without
Medium
modifying the values in the list's nodes (i.e., only nodes
themselves may be changed.)
Given a singly linked list and an integer k, the task is to
Medium
rotate the linked list to the left by k places
Insert a node at given position Easy
Given the head of a singly linked list, return true if it is a
Easy
palindrome or false otherwise.
You are given the head of a linked list. Delete the middle
node, and return the head of the modified linked list.
The middle node of a linked list of size n is the ⌊n / 2⌋th
node from the start using 0-based indexing, where ⌊x⌋ Easy
denotes the largest integer less than or equal to x.

You are given two singly linked lists containing unsorted


integers. Your task is to first sort both linked lists individually
Medium
and then merge them into a single sorted linked list. Finally,
return the merged sorted linked list in the correct format.
Problem Link

https://leetcode.com/problems/intersection-of-two-linked-lists/description/

https://leetcode.com/problems/delete-node-in-a-linked-list/description/

https://www.geeksforgeeks.org/delete-a-linked-list-node-at-a-given-position/

https://leetcode.com/problems/linked-list-cycle/description/

https://leetcode.com/problems/reverse-linked-list/description/

https://leetcode.com/problems/swap-nodes-in-pairs/description/

https://www.geeksforgeeks.org/rotate-a-linked-list/

https://www.geeksforgeeks.org/insert-a-node-at-a-specific-position-in-a-linked
https://leetcode.com/problems/palindrome-linked-list/description/

https://leetcode.com/problems/delete-the-middle-node-of-a-linked-list/description/
Solution

https://www.geeksforgeeks.org/write-a-function-to-get-the-intersection-point-of-two-linked-lists/

https://www.geeksforgeeks.org/delete-a-linked-list-node-at-a-given-position/?ref=lbp

https://www.geeksforgeeks.org/detect-loop-in-a-linked-list/

https://www.geeksforgeeks.org/reverse-a-linked-list/

https://www.geeksforgeeks.org/pairwise-swap-adjacent-nodes-of-a-linked-list-by-changing-pointers-set-2/

https://www.geeksforgeeks.org/rotate-a-linked-list/

https://www.geeksforgeeks.org/insert-a-node-at-a-specific-position-in-a-linked-list/
https://www.geeksforgeeks.org/function-to-check-if-a-singly-linked-list-is-palindrome/

https://www.geeksforgeeks.org/delete-middle-of-linked-list/

https://drive.google.com/file/d/1eqAcc9xaq8qAqaSd-PYAVz8vKtAI3IgI/view?usp=drive_link

You might also like