随笔分类 -  leetcode

leetcode
摘要: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 阅读全文
posted @ 2019-09-06 14:32 mathli 阅读(48) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2019-07-26 22:40 mathli 阅读(47) 评论(0) 推荐(0) 编辑
摘要:leetcode algorithms 203 Remove Linked List Elements Remove all elements from a linked list of integers that have value val. Example: 解法 阅读全文
posted @ 2019-07-19 22:09 mathli 阅读(77) 评论(0) 推荐(0) 编辑
摘要: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. 阅读全文
posted @ 2019-07-08 22:27 mathli 阅读(86) 评论(0) 推荐(0) 编辑
摘要:leetcode algorithms 148 Sort List Sort a linked list in O(n log n) time using constant space complexity. Example 1: Example 2: 解法 阅读全文
posted @ 2019-07-03 22:59 mathli 阅读(89) 评论(0) 推荐(0) 编辑
摘要:leetcode algorithms 147 Insertion Sort List Sort a linked list using insertion sort. A graphical example of insertion sort. The partial sorted list (b 阅读全文
posted @ 2019-07-01 22:10 mathli 阅读(83) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2019-06-23 22:40 mathli 阅读(73) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2019-06-18 14:23 mathli 阅读(181) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2019-06-13 22:11 mathli 阅读(113) 评论(0) 推荐(0) 编辑
摘要:leetcode algorithms 109. Convert Sorted List to Binary Search Tree Given a singly linked list where elements are sorted in ascending order, convert it 阅读全文
posted @ 2019-06-09 21:49 mathli 阅读(68) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2019-06-01 22:14 mathli 阅读(107) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-12-08 15:11 mathli 阅读(143) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-12-08 14:58 mathli 阅读(108) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-12-08 14:54 mathli 阅读(79) 评论(0) 推荐(0) 编辑
摘要:leetcode algorithms 32 Longest Valid Parentheses Given a string containing just the characters '(' and ')', find the length of the longest valid (well 阅读全文
posted @ 2018-12-06 22:59 mathli 阅读(75) 评论(0) 推荐(0) 编辑
摘要:leetcode algorithms 33 Search in Rotated Sorted Array Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. ( 阅读全文
posted @ 2018-12-06 22:50 mathli 阅读(96) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-12-05 22:56 mathli 阅读(90) 评论(0) 推荐(0) 编辑
摘要:leetcode algorithms 29 Divide Two Integers Given two integers dividend and divisor, divide two integers without using multiplication, division and mod 阅读全文
posted @ 2018-12-03 22:18 mathli 阅读(111) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-11-26 16:40 mathli 阅读(96) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2018-11-26 16:40 mathli 阅读(65) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示