LeetCode-Copy List with Random Pointer
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null
You are given a doubly linked list which in addition to the next and previous pointers, it could have a child pointer, which may or may not point to a separate…
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: Input: 1-…
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes
Photo by Tim Swaan on Unsplash
Given a singly linked list, determine if it is a palindrome. Example 1: Example 2: Follow up: Could you do it in O(n) time and O(1) space? 找到中间节点后反转判断节点回文
Given an array of integers nums, write a method that returns the "pivot" index of this array. We define the pivot index as the index where the sum of the…