### 数据结构与算法分析

4 已关注
43篇博文
• #### [Leetcode]-Contains Duplicate HashTbale重解

Given an array of integers, find if the array contains any duplicates. Your function should return t...

2015-07-07 21:54
786
• #### 哈希表（散列）HashTable实现

最近刷Leetcode发现凡是找字符串中重复字符或者数组中找重复数据的时候就不知道从何下手了。 　　所以决定学习一下哈希表解题，哈希表的原理主要是解决分类问题，hash表是介于链表和二叉树之间的一种...

2015-07-07 21:03
676

Given two binary strings, return their sum (also a binary string).For example, a = “11” b = “1” R...

2015-07-06 11:04
432
• #### [Leetcode]-Climbing Stairs

You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1...

2015-07-06 10:57
410
• #### [Leetcode]-Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once.For exampl...

2015-07-06 10:53
711
• #### [Leetcode]-Merge Sorted Array

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note: Y...

2015-07-06 10:45
542
• #### [Leetcode]-Same Tree

Given two binary trees, write a function to check if they are equal or not.Two binary trees are cons...

2015-07-06 10:21
675
• #### [Leetcode]-Balanced Binary Tree

Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary t...

2015-07-06 10:14
535
• #### [leetcode]-Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longe...

2015-07-06 10:06
744
• #### [Leetcode]-Minimum Depth of Binary Tree

Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the short...

2015-07-04 14:58
594
• #### [Leetcode]-Path Sum

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all...

2015-07-04 14:44
639
• #### [Leetcode]-Remove Duplicates from Sorted Array

Given a sorted array, remove the duplicates in place such that each element appear only once and ret...

2015-07-04 14:19
539
• #### [Leetcode]-Pascal's Triangle II

Given an index k, return the kth row of the Pascal’s triangle.For example, given k = 3, Return [1,3...

2015-07-04 14:08
585
• #### [Leetcode]-Pascal's Triangle

Given numRows, generate the first numRows of Pascal’s triangle.For example, given numRows = 5, Retu...

2015-07-03 19:46
949
• #### [Leetcode]-Valid Palindrome

Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignori...

2015-07-02 21:06
590
• #### [Leetcode]-Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing t...

2015-07-02 14:20
517
• #### [Leetcode]-Min Stack

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.pus...

2015-07-01 21:30
521
• #### [Leetcode]-Palindrome Number

Determine whether an integer is a palindrome. Do this without extra space. 题目：判断int数据是否为回文数 注意：负数不...

2015-07-01 16:32
588
• #### [Leetcode]-Intersection of Two Linked Lists

Write a program to find the node at which the intersection of two singly linked lists begins.For exa...

2015-07-01 15:07
546
• #### [Leetcode]-String to Integer (atoi)

mplement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. I...

2015-07-01 14:02
542