2015年11月3日

LeetCode--Excel Sheet Column Title

摘要: 题目: Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 1 -> A 2 -> B 3 -> C .... 阅读全文

posted @ 2015-11-03 11:33 小二杰 阅读(87) 评论(0) 推荐(0) 编辑

LeetCode--Single Number III

摘要: 题目: Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two ... 阅读全文

posted @ 2015-11-03 11:29 小二杰 阅读(130) 评论(0) 推荐(0) 编辑

LeetCode--Contains Duplicate

摘要: 题目: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in ... 阅读全文

posted @ 2015-11-03 11:23 小二杰 阅读(92) 评论(0) 推荐(0) 编辑

LeetCode--Best Time to Buy and Sell Stock II

摘要: 题目: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You m... 阅读全文

posted @ 2015-11-03 11:21 小二杰 阅读(106) 评论(0) 推荐(0) 编辑

LeetCode--Invert Binary Tree

摘要: 题目: Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9 to 4 / \ 7 2 / \ / \9 6 3 1 Trivia: This problem was in... 阅读全文

posted @ 2015-11-03 11:16 小二杰 阅读(105) 评论(0) 推荐(0) 编辑

LeetCode--Move Zeroes

摘要: 题目: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For ex... 阅读全文

posted @ 2015-11-03 11:10 小二杰 阅读(88) 评论(0) 推荐(0) 编辑

LeetCode--Same Tree

摘要: 题目: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally id... 阅读全文

posted @ 2015-11-03 11:08 小二杰 阅读(107) 评论(0) 推荐(0) 编辑

LeetCode--Delete Node in a Linked List

摘要: 题目: 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 ->... 阅读全文

posted @ 2015-11-03 11:06 小二杰 阅读(92) 评论(0) 推荐(0) 编辑

LeetCode--Maximum Depth of Binary Tree

摘要: 题目: 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 f... 阅读全文

posted @ 2015-11-03 11:02 小二杰 阅读(80) 评论(0) 推荐(0) 编辑

LeetCode--Single Number

摘要: 题目: Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runt... 阅读全文

posted @ 2015-11-03 10:54 小二杰 阅读(72) 评论(0) 推荐(0) 编辑

导航