Linked List Partitioning
You are given a singly linked list node and an integer k. Order the linked list so that all nodes whose values are less than k come first, all nodes whose va...
You are given a singly linked list node and an integer k. Order the linked list so that all nodes whose values are less than k come first, all nodes whose va...
Given a singly linked list node, and integers i and j, reverse the linked list from i to jth nodes, 0 indexed and inclusive.
Given a singly linked list node, and an integer k, reverse every k contiguous group of nodes.
Given a singly linked list node, and an integer target, delete the last occurrence of target in node.
Given a singly linked list of integers node, sort the nodes by their values in ascending order.
Given two sorted linked lists l0, and l1, return a new sorted linked list containing the intersection of the two lists.
You are given a singly linked list node containing integer values. Take the first half of the linked list and fold over the second half and merge the interse...
You are given a singly linked list node and an integer k. Swap the value of the k-th (0-indexed) node from the end with the k-th node from the beginning.
Given two linked lists l0 and l1, return the two linked lists interleaved, starting with l0. If there are leftover nodes in a linked list, they should be add...
Given a singly linked list node, swap each pair of nodes and return the new head.
Given a singly linked list node, convert it to a binary tree path using these rules:
You are given two linked lists a and b as well as integers lo and hi.
Given a singly linked list node, return the value of the kth last node (0-indexed). k is guaranteed not to be larger than the size of the linked list.
Given a singly linked list node, return the value of the middle node. If there’s two middle nodes, then return the second one.
Given a linked list node and a non-negative integer k, rotate the list to the right by k places.
Given a singly linked list node, return its reverse.
Given a singly linked list node, remove nodes with duplicate values while maintaining relative order of the original list.
Given a singly linked list node whose values are integers, determine whether the linked list forms a palindrome.
Given two sorted linked lists node0, and node, return a new sorted linked list containing the union of the two lists.
Given a single linked list node, representing a binary number with most significant digits first, return it as an integer.
Given a sorted linked list node of size n, construct a binary search tree by
You are given a singly linked list node containing positive integers. Return the same linked list where every node’s next points to the node val nodes ahead....
Given a singly linked list node, and an integer target, return the same linked list with all nodes whose value is target removed.
Given a binary tree root, convert it to a singly linked list using level order traversal.
Given a singly linked list node, return its length. The linked list has fields next and val.
Given a binary tree root, convert it to a singly linked list using an inorder traversal.
Given a singly linked list node, reorder it such that we take: the last node, and then the first node, and then the second last node, and then the second nod...
Given a singly linked list l0 and another linked list l1, each representing a number with least significant digits first, return the summed linked list.
Given the head of a singly linked list head, return whether the values of the nodes are sorted in a strictly increasing order.