04 2017 档案

摘要:题目: Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3] have the following permutations: 题解: 之前解过Next Permut 阅读全文
posted @ 2017-04-26 08:59 Vincent丶丶 阅读(494) 评论(0) 推荐(0) 编辑
摘要:题目: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not po 阅读全文
posted @ 2017-04-24 22:19 Vincent丶丶 阅读(165) 评论(0) 推荐(0) 编辑
摘要:题目: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 阅读全文
posted @ 2017-04-24 21:06 Vincent丶丶 阅读(150) 评论(0) 推荐(0) 编辑
摘要:题目: Remove all elements from a linked list of integers that have value val. Example 题解: 这道题没什么好讲的,基础操作。需要注意的是链表的第一个node,因为没有前驱节点,所以该node需要特殊处理,会导致额外的代 阅读全文
posted @ 2017-04-24 20:47 Vincent丶丶 阅读(183) 评论(0) 推荐(0) 编辑
摘要:题目: Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, 阅读全文
posted @ 2017-04-23 13:40 Vincent丶丶 阅读(183) 评论(0) 推荐(0) 编辑
摘要:题目: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra spac 阅读全文
posted @ 2017-04-23 12:49 Vincent丶丶 阅读(161) 评论(0) 推荐(0) 编辑
摘要:题目: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stoppin 阅读全文
posted @ 2017-04-22 17:15 Vincent丶丶 阅读(171) 评论(0) 推荐(0) 编辑
摘要:题目: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,- 阅读全文
posted @ 2017-04-18 22:30 Vincent丶丶 阅读(178) 评论(0) 推荐(0) 编辑
摘要:题目: Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2, 阅读全文
posted @ 2017-04-18 20:42 Vincent丶丶 阅读(206) 评论(0) 推荐(0) 编辑
摘要:题目: Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums exc 阅读全文
posted @ 2017-04-18 19:46 Vincent丶丶 阅读(173) 评论(0) 推荐(0) 编辑
摘要:题目: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after rain 阅读全文
posted @ 2017-04-17 21:03 Vincent丶丶 阅读(211) 评论(0) 推荐(0) 编辑
摘要:题目: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two e 阅读全文
posted @ 2017-04-16 14:03 Vincent丶丶 阅读(256) 评论(0) 推荐(0) 编辑
摘要:题目: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexit 阅读全文
posted @ 2017-04-16 13:16 Vincent丶丶 阅读(261) 评论(0) 推荐(0) 编辑
摘要:题目: Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero. To make 阅读全文
posted @ 2017-04-15 22:17 Vincent丶丶 阅读(465) 评论(0) 推荐(0) 编辑
摘要:题目: Given an array of n integers nums and a target, find the number of index triplets i, j, k with 0 <= i < j < k < n that satisfy the condition nums[ 阅读全文
posted @ 2017-04-15 21:00 Vincent丶丶 阅读(187) 评论(0) 推荐(0) 编辑
摘要:题目: Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integ 阅读全文
posted @ 2017-04-15 20:23 Vincent丶丶 阅读(231) 评论(0) 推荐(0) 编辑
摘要:题目: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array 阅读全文
posted @ 2017-04-15 16:37 Vincent丶丶 阅读(131) 评论(0) 推荐(0) 编辑
摘要:题目: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum 阅读全文
posted @ 2017-04-15 15:08 Vincent丶丶 阅读(252) 评论(0) 推荐(0) 编辑
摘要:题目: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would hav 阅读全文
posted @ 2017-04-15 12:33 Vincent丶丶 阅读(246) 评论(0) 推荐(0) 编辑
摘要:题目: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes co 阅读全文
posted @ 2017-04-15 12:24 Vincent丶丶 阅读(224) 评论(0) 推荐(0) 编辑

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