Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree and sum
...
分类:
其他好文 时间:
2014-12-30 19:10:58
阅读次数:
135
ActionBar下拉选项卡
一、ActionBar简介
ActionBar(活动栏)替代了显示在屏幕顶端的标题栏,主要负责显示菜单,widget,导航等功能。
ActionBar主要由四个部分组成:
AppIcon(应用标识、向主界面导航)、ViewControl(视图切换,或者显示一些描述信息)、ActionButtons(显示应用程序中最重要的动作、长按图标会提示该动...
分类:
其他好文 时间:
2014-12-30 15:22:55
阅读次数:
170
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20,#,#,15,7},
...
分类:
其他好文 时间:
2014-12-30 15:17:01
阅读次数:
160
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:
其他好文 时间:
2014-12-30 08:09:14
阅读次数:
161
The question:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices ...
分类:
其他好文 时间:
2014-12-30 07:01:44
阅读次数:
170
The Problem:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices o...
分类:
其他好文 时间:
2014-12-30 07:00:19
阅读次数:
201
u-boot-2014.10代码分析及移植说明 1 ENTRY(_main) 2 3 /* 4 * Set up initial C runtime environment and call board_init_f(0). 5 */ 6 7 #if defined(CONFIG_SPL_B...
分类:
其他好文 时间:
2014-12-30 00:17:13
阅读次数:
401
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.
Follow up:
Can you solve it without using extra space?
首先设圆环的长度为r,距离环口为a时相遇,环外的那一段的距离是b,那么有2(a+b)=a...
分类:
其他好文 时间:
2014-12-29 21:35:30
阅读次数:
248
Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra space?
利用快慢指针
/**
* Definition for singly-linked list.
* class ListNode {
* int v...
分类:
其他好文 时间:
2014-12-29 21:35:23
阅读次数:
235
怎样制作一款优秀的塔防游戏?近日,独立游戏工作室,经典塔防游戏《守护者冒险》(Defender’s Quest)开发商Level Up Labs联合创始人拉斯·杜切特(Lars Doucet)撰写专栏文章,分享了其工作室制作《守护者冒险》的11项原则。杜切特表示,塔防游戏要想最大限度发挥自身潜力,需...
分类:
其他好文 时间:
2014-12-29 18:08:50
阅读次数:
223