2014年5月1日

Convert Sorted List to Binary Search Tree

摘要: http://oj.leetcode.com/problems/convert-sorted-list-to-binary-search-tree/Example:Input: Linked List 1->2->3Output: A Balanced BST 2 / \ ... 阅读全文

posted @ 2014-05-01 23:59 Atlas-Zzz 阅读(127) 评论(0) 推荐(0) 编辑

Add Two Numbers

摘要: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ... 阅读全文

posted @ 2014-05-01 12:30 Atlas-Zzz 阅读(140) 评论(0) 推荐(0) 编辑

Median of Two Sorted Arrays

摘要: Original Blog:http://leetcode.com/2011/03/median-of-two-sorted-arrays.html#comment-1053 阅读全文

posted @ 2014-05-01 08:00 Atlas-Zzz 阅读(77) 评论(0) 推荐(0) 编辑

Two Sum

摘要: Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu... 阅读全文

posted @ 2014-05-01 07:30 Atlas-Zzz 阅读(88) 评论(0) 推荐(0) 编辑

2014年4月30日

Reverse Integer

摘要: Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Have you thought about this?Here are some good questions to ask... 阅读全文

posted @ 2014-04-30 12:47 Atlas-Zzz 阅读(164) 评论(0) 推荐(0) 编辑

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 identical an... 阅读全文

posted @ 2014-04-30 09:37 Atlas-Zzz 阅读(116) 评论(0) 推荐(0) 编辑

BST(Binary Search Tree)

摘要: Definition: see wikihttp://en.wikipedia.org/wiki/Binary_search_tree 1 /* 2 This look up is a fast operation because you eliminate the half 3 t... 阅读全文

posted @ 2014-04-30 08:17 Atlas-Zzz 阅读(261) 评论(0) 推荐(0) 编辑

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 farthest le... 阅读全文

posted @ 2014-04-30 05:39 Atlas-Zzz 阅读(115) 评论(0) 推荐(0) 编辑

Single Number

摘要: Single NumberGiven an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runti... 阅读全文

posted @ 2014-04-30 05:11 Atlas-Zzz 阅读(109) 评论(0) 推荐(0) 编辑

2014年4月13日

Computer System Basic Concept(2)

摘要: Note: this is copied from my google doc, the format isweirdBe able to describe how different virtual memory schemes are implemented, including base an... 阅读全文

posted @ 2014-04-13 22:23 Atlas-Zzz 阅读(216) 评论(0) 推荐(0) 编辑

导航