[LeetCode] Nested List Weight Sum 嵌套链表权重和

Given a nested list of integers, return the sum of all integers in the list weighted by their depth. Each element is either an integer, or a list -- w...

[LeetCode] Split Linked List in Parts 拆分链表成部分

Given a (singly) linked list with head node root, write a function to split the linked list into k consecutive linked list "parts". The...

[LeetCode] 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 must do this in-place without altering the no...

[LeetCode] Partition List 划分链表

Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You ...

[LeetCode] Rotate List 旋转链表

Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1->2->3->4->5...

LeetCode 234 Palindrome Linked List(回文链表)(*)

版权声明:转载请联系本人,感谢配合!本站地址:http://blog.csdn.net/nomasp https://blog.csdn.net/NoMasp/article/details/52661264 翻译 给定一个单链表,判断它是否是回文的。 跟进: 你可以只用O(n)的时间和O(1)的空...

LeetCode 141 Linked List Cycle(循环链表)(HashSet/Linked List)

版权声明:转载请联系本人,感谢配合!本站地址:http://blog.csdn.net/nomasp https://blog.csdn.net/NoMasp/article/details/51598735 翻译 给定一个链表,判断是否有一个循环在其中。 跟进: 你可以不用额外的空间来解决这个问题...

LeetCode 237 Delete Node in a Linked List(在链表中删除节点)

翻译 给定一个访问节点的路径,写一个函数去删除在一个单向链表中除尾部以外的节点。 假设这个链表是1 -> 2 -> 3 -> 4,并且你被给予了第3个值为3的节点,那么在调用你的函数之后这个链表应该变为1 -> 2 -> 4。 原文 Write a function t...

[LeetCode] Remove Duplicates from Sorted List - 链表问题

题目概述:Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2. Given ...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。