- 博客(12)
- 资源 (8)
- 收藏
- 关注
原创 LeetCode:Binary Tree Paths 简洁算法
Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-leaf paths are:["1->2->5", "1->3"]
2015-08-31 19:36:32 496 1
转载 IOS Storyboard中使用Segue传值
IOS Storyboard中使用Segue传值需求描述:故事板中,VIEW1与VIEW2有一条SEGUE连线。点击VIEW1中的按钮跳转至VIEW2,并且从VIEW1中传递值给VIEW2。实现:VIEW1.m添加下面的事件方法,该方法在视图跳转时被触发。-(void)prepareForSegue:(UIStoryboard
2015-08-23 19:33:39 420
原创 LeetCode:Invert Binary Tree
Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1解题思路:类似于后序遍历的思想,递归的思想,先完成左子树的交换,再完成右子树的交换,再将根节点的左右子树交换。未优化代码如下:
2015-08-12 23:20:07 552 1
原创 ZigZag Conversion
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I
2015-08-10 09:59:14 831 1
原创 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 digit. Add the two numbers and return it as a link
2015-08-09 22:55:45 552
原创 Majority Element:主元素
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element
2015-08-09 21:04:18 497
原创 Flatten Binary Tree to Linked List
* * For example, * Given * * 1 * / \ * 2 5 * / \ \ * 3 4 6 *
2015-08-09 20:42:38 472
转载 iBeacon技术解析:苹果对抗NFC的利器
转载地址:http://digi.tech.qq.com/a/20130915/001341.htm在今年六月举行的WWDC上,作为iOS 7中最重要的新特性之一,苹果正式对外发布了iBeacon。虽然在发布会上,苹果软件工程副总裁Craig Federighi并未提及iBeacon,而且苹果也没有对外公布这项技术的细节,不过iBeacon的名称还是出现
2015-08-09 10:35:39 626 1
转载 IOS学习之蓝牙4.0 BLE
转载请注明出处http://blog.csdn.net/pony_maggie/article/details/26740237作者:小马IOS学习也一段时间了,该上点干货了。前段时间研究了一下IOS蓝牙通讯相关的东西,把研究的一个成果给大家分享一下。 一 项目背景简单介绍一下做的东西,设备是一个金融刷卡器,通过蓝牙与ip
2015-08-09 09:50:37 678 1
原创 Android:Eclipse 安装Genymotion插件的时候出现 There are no categorized items
解决方法:将下面红框“Group items by category” 取消勾选就OK 了。
2015-08-07 17:45:31 4565 3
原创 Android:HttpGet与HttpPost
AndroidManifest,xmlactivity_main.xml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_widt
2015-08-04 12:51:39 991
原创 android.os.NetworkOnMainThreadException的解决方案
首先,确定AndroidManifest.xml中 其次,这次异常的抛出是因为有一个网络操作试图占用主线程,我们建立一个新线程,异步进行即可,代码如下:Thread thread = new Thread(new Runnable(){ @Override public void run() {
2015-08-04 10:38:59 847 1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人