摘要:
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
摘要:
Given a node from a cyclic linked list which is sorted in ascending order, write a function to insert a value into the list such that it remains a cyc 阅读全文
摘要:
Given a (singly) linked list with head node root, write a function to split the linked list into k consecutive linked list "parts". The length of each 阅读全文
摘要:
Given a non-negative integer represented as non-empty a singly linked list of digits, plus one to the integer. You may assume the integer do not conta 阅读全文
摘要:
Sort a linked list using insertion sort. A graphical example of insertion sort. The partial sorted list (black) initially contains only the first elem 阅读全文
摘要:
We are given head, the head node of a linked list containing unique integer values. We are also given the list G, a subset of the values in the linked 阅读全文
摘要:
Given a linked list, rotate the list to the right by k places, where k is non-negative. Example 1: Example 2: time: O(n), space: O(1) 阅读全文
摘要:
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Example 1: Example 2: 阅读全文
摘要:
Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the 阅读全文
摘要:
Design a Phone Directory which supports the following operations: Example: M1: 用linked hast set,通过iterator得到具体元素 docs: https://docs.oracle.com/javase/ 阅读全文
摘要:
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Given linked list -- head = [4,5,1,9], wh 阅读全文
摘要:
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 阅读全文
摘要:
Design your implementation of the linked list. You can choose to use the singly linked list or the doubly linked list. A node in a singly linked list 阅读全文
摘要:
Given a sorted linked list, delete all duplicates such that each element appear only once. Example 1: Example 2: time: O(n), space: O(1) 阅读全文
摘要:
Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin to in 阅读全文
摘要:
Convert a BST to a sorted circular doubly-linked list in-place. Think of the left and right pointers as synonymous to the previous and next pointers i 阅读全文