摘要:leetcode algorithms 328 Odd Even Linked List Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we
阅读全文
摘要:leetcode algorithms 234 Palindrome Linked List Given a singly linked list, determine if it is a palindrome. Example 1: Example 2: Follow up: Could you
阅读全文
摘要:leetcode algorithms 160 Intersection of Two Linked Lists Write a program to find the node at which the intersection of two singly linked lists begins.
阅读全文
摘要:leetcode algorithms 147 Insertion Sort List Sort a linked list using insertion sort. A graphical example of insertion sort. The partial sorted list (b
阅读全文
摘要:leetcode algorithms 143 Reorder List Given a singly linked list L: L0→L1→…→Ln 1→Ln, reorder it to: L0→Ln→L1→Ln 1→L2→Ln 2→… You may not modify the valu
阅读全文
摘要:leetcode algorithms 142 Linked List Cycle II Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To repres
阅读全文
摘要:leetcode algorithms 141. Linked List Cycle Given a linked list, determine if it has a cycle in it. To represent a cycle in the given linked list, we u
阅读全文
摘要:leetcode algorithms 109. Convert Sorted List to Binary Search Tree Given a singly linked list where elements are sorted in ascending order, convert it
阅读全文
摘要:leetcode algorithms 92. Reverse Linked List II Reverse a linked list from position m to n. Do it in one pass. Note: 1 ≤ m ≤ n ≤ length of list. Exampl
阅读全文
摘要:leetcode algorithms 36 Valid Sudoku Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following ru
阅读全文
摘要:leetcode algorithms 35 Search Insert Position Given a sorted array and a target value, return the index if the target is found. If not, return the ind
阅读全文
摘要:leetcode algorithms 34 Find First and Last Position of Element in Sorted Array Given an array of integers nums sorted in ascending order, find the sta
阅读全文
摘要:leetcode algorithms 32 Longest Valid Parentheses Given a string containing just the characters '(' and ')', find the length of the longest valid (well
阅读全文
摘要:leetcode algorithms 33 Search in Rotated Sorted Array Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (
阅读全文
摘要:leetcode algorithms 30 Substring with Concatenation of All Words You are given a string, s, and a list of words, words, that are all of the same lengt
阅读全文
摘要:leetcode algorithms 29 Divide Two Integers Given two integers dividend and divisor, divide two integers without using multiplication, division and mod
阅读全文
摘要:leetcode algorithms 23 Merge k Sorted Lists Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example
阅读全文
摘要:leetcode algorithms 25 Reverse Nodes in k Group Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is
阅读全文