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 ...
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 whose elements may also be integers or other lists. D ...
2016-06-24 23:35 7 11601 推荐指数:
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 ...
Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤ n ≤ length of list. Example: 很奇怪为何没有倒置链表之一,就来了这个倒置链表之二,不过猜 ...
Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also ...
Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in the given linked list, we ...
Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are suc ...
Given a collection of candidate numbers (candidates) and a target number (target), find all uniqu ...
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Example ...
题目描述 给定一个链表,返回链表开始入环的第一个节点。 如果链表无环,则返回 null。 说明:不允许修改给定的链表。 进阶: 你是否可以不用额外空间解决此题? 解题思路 分为三步: 首先判断是否存在环,利用快慢指针法,从头节点开始快指针每次走两步 ...