Leetcode
Nicolos_Z
千里之堤,溃于蚁穴.
展开
-
Longest Palindromic Substring--求字符串最长回文子串 - Leetcode
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.原创 2017-02-22 10:37:29 · 382 阅读 · 0 评论 -
3Sum - LeetCode
找出数组中三个数之和为零的所有不重复情况。原创 2017-03-13 23:46:01 · 331 阅读 · 0 评论 -
Intersection of Two Linked Lists - LeetCode
leetcode Intersection of Two Linked Lists 求两个链表交集的第一个结点,原创 2017-03-09 18:56:01 · 455 阅读 · 0 评论 -
Longest Substring Without Repeating Characters - LeetCode
Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "原创 2017-02-22 22:30:59 · 268 阅读 · 0 评论 -
Sort List - LeetCode
对链表元素排序,要求时间复杂度nlgn 空间复杂度 O(1)原创 2017-03-08 15:25:19 · 383 阅读 · 0 评论 -
Palindrome Linked List - LeetCode 判断一个链表是否是回文结构
Given a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?Difficulty: Easy思路:判断一个链表是否是回文结构例如:1->2->3->2->1 是 1->2原创 2017-03-04 21:10:46 · 599 阅读 · 0 评论 -
Maximum Depth of Binary Tree - LeetCode
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Difficulty: Easy原创 2017-03-08 10:35:43 · 250 阅读 · 0 评论 -
Longest Increasing Subsequence - LeetCode
Given an unsorted array of integers, find the length of longest increasing subsequence.For example,Given [10, 9, 2, 5, 3, 7, 101, 18],The longest increasing subsequence is [2, 3, 7, 101], ther原创 2017-02-24 14:28:20 · 265 阅读 · 0 评论 -
Remove Nth Node From End of List - LeetCode
Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the原创 2017-02-23 17:24:56 · 226 阅读 · 0 评论 -
Linked List Cycle - LeetCode
Given a linked list, determine if it has a cycle in it. 给定一个单链表,判断其中是否有环Follow up:Can you solve it without using extra space?Difficulty: Easy思路:采用“快慢指针”查检查链表是否含有环。让一个指针一次走一步,另一个一次原创 2017-02-23 16:19:59 · 245 阅读 · 0 评论 -
Two Sum - Leetcode
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 have exactly one solution, and you may not use the sam原创 2017-02-22 15:55:57 · 331 阅读 · 0 评论 -
Symmetric Tree - LeetCode
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 2 / \ / \3 4 4 3原创 2017-02-22 22:27:50 · 281 阅读 · 0 评论 -
亚马逊Amazon OA2 -LintCode 九道题-JAVA
亚马逊OA2九道题,亚马逊面试题,LintCode原创 2017-10-15 14:24:25 · 8573 阅读 · 0 评论