CODE 16: Populating Next Right Pointers in Each Node II

Follow up for problem "Populating Next Right Pointers in Each Node". What if the given tree could be any binary tree? Would your previous ...

2013-09-16 21:23:51

阅读数:594

评论数:0

CODE 17: Populating Next Right Pointers in Each Node

Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; } Populate each ne...

2013-09-16 21:22:44

阅读数:511

评论数:0

CODE 15: Pascal's Triangle

Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1]...

2013-09-16 20:59:27

阅读数:553

评论数:0

CODE 9: Binary Tree Maximum Path Sum

Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For example: Given the below binary tree, ...

2013-09-16 20:53:06

阅读数:682

评论数:0

CODE 2: Palindrome Partitioning

Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For examp...

2013-09-16 20:25:58

阅读数:596

评论数:0

CODE 14: 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,3,1]. Note: Could you optimize your algorithm...

2013-09-15 21:19:49

阅读数:465

评论数:0

CODE 13: Triangle

Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the f...

2013-09-15 18:57:30

阅读数:432

评论数:0

CODE 10: Best Time to Buy and Sell Stock III

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 may comp...

2013-09-15 16:57:05

阅读数:733

评论数:0

CODE 11: 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 may comp...

2013-09-15 16:56:50

阅读数:765

评论数:0

CODE 12: Best Time to Buy and Sell Stock

Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transacti...

2013-09-15 16:55:55

阅读数:669

评论数:0

CODE 8: Valid Palindrome

Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example, "A man, a plan, a can...

2013-09-12 22:13:27

阅读数:565

评论数:0

CODE 7: Word Ladder

Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Only one letter...

2013-09-12 00:05:40

阅读数:545

评论数:0

CODE 5: Longest Consecutive Sequence

Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2], The lon...

2013-09-10 22:28:57

阅读数:440

评论数:0

CODE 4: Sum Root to Leaf Numbers

Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->...

2013-09-09 22:47:01

阅读数:566

评论数:0

CODE 3: Surrounded Regions

Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in that surrounde...

2013-09-09 21:30:24

阅读数:525

评论数:1

CODE 1: Palindrome Partitioning II

Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitionin...

2013-09-08 15:08:02

阅读数:454

评论数:1

人生就是不停的战斗————九把刀北大演讲

时间:2011年11月5日 地点:北京大学2号楼205 主题:人生就是不停的战斗 手打组:中财刘铮,魏文婷 请尊重手打组作品,转载勿删除手打组。   非常非常开心能够来北京大学演讲,我能表现出的最大的诚意就是,今天的演讲将是原汁原味非常忠于台湾版本的“人生就是不停的战斗”,还加了一段目前在台湾演讲...

2011-11-18 13:42:20

阅读数:1862

评论数:0

python 串口测试工具中 py2exe的使用

python 串口测试工具中 py2exe的使用 from distutils.core import setup import py2exe import sys, os sys.argv.append('py2exe') origIsSystemDLL = py2exe.build_e...

2011-11-17 23:09:22

阅读数:1100

评论数:0

python串口通信模块——pySerial

pySerial Overview This module encapsulates the access for the serial port. It provides backends for Python running on Windows, Linux, BSD (possibly...

2011-11-17 22:20:24

阅读数:2180

评论数:0

在python文件中集成图片

方法一: http://leo108.com/pid-938.asp 使用base64方式编解码。 核心代码如下: 1.将图片文件编码为base64字符串: import base64 #导入base64库 f = open(r'/home/1....

2011-11-14 13:43:34

阅读数:415

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭