自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(116)
  • 资源 (7)
  • 收藏
  • 关注

原创 Android命令monkey测试

一、Monkey测试简介Monkey测试是Android平台自动化测试的一种手段,通过Monkey程序模拟用户触摸屏幕、滑动Trackball、按键等操作来对设备上的程序进行压力测试,检测程序多久的时间会发生异常。 二、Monkey程序介绍1) Monkey程序由Android系统自带,使用Java语言写成,在Android文件系统中的存放路径是:/system/f

2015-11-27 18:17:43 573

转载 Android uiautomator(1)-创建工程例子

在Android 4.1发布的时候包含了一种新的测试工具–uiautomator,uiautomator是用来做UI测试的。也就是普通的手工测试,点击每个控件元素 看看输出的结果是否符合预期。比如 登陆界面 分别输入正确和错误的用户名密码然后点击登陆按钮看看是否能否登陆以及是否有错误提示等。功能性或者黑盒UI测试不需要测试人员了解程序如何实现的,只需要验证各种操作的结果是否符合预期即可

2015-11-27 16:27:05 828

原创 Android问题集锦之一:adb devices 出现unauthorized错误

解决办法:手机上usb确认请求没有勾选,所以看一眼手机,勾选确定就能购解决。

2015-11-27 13:49:58 3087

转载 五步搞定Android开发环境部署——非常详细的Android开发环境搭建教程

引言 在windows安装Android的开发环境不简单也说不上算复杂,本文写给第一次想在自己Windows上建立Android开发环境投入Android浪潮的朋友们,为了确保大家能顺利完成开发环境的搭建,文章写的尽量详细,希望对准备进入Android开发的朋友有帮助。 本教程将分为五个步骤来完成Android开发环境的部署。第一步:安装JDK。第二步:配置Windows上

2015-11-20 19:28:19 851

原创 CSS布局模型

CSS包含3种基本的布局模型,用英文概括为:Flow、Layer 和 Float。在网页中,元素有三种布局模型:1、流动模型(Flow)2、浮动模型 (Float)3、层模型(Layer)

2015-02-01 19:12:12 460

原创 CSS基本知识

1 CSS样式可以写在哪些地方呢?从CSS 样式代码插入的形式来看基本可以分为以下3种:内联式、嵌入式和外部式三种。这一小节先来讲解内联式。内联式css样式表就是把css代码直接写在现有的HTML标签中,如下面代码:这里文字是红色。嵌入式css样式,就是可以把css样式代码写在标签之间。如下面代码实现把三个标签中的文字设置为红色:span{color:red;}

2015-01-31 23:20:02 465

原创 面试题24:二叉搜索树的后序遍历序列

题目:输入一个整数数组,判断该数组是不是某二叉树搜索树的后续遍历的结果。如果是返回true,不是返回false。分析:这是二叉搜索树的一种常见考察题型,有一种固定的思路要掌握。

2014-12-30 10:27:30 531

原创 面试题23:从上往下打印二叉树

题目:从上往下打印出二叉树的每个节点,同一层的节点按照从左往右的顺序打印。分析:本题考查树的层次遍历,是树的考查题目中一个基本的应该掌握的题型。有了结合队列的想法,基本就能够解决这个题目。

2014-12-26 16:35:48 475

原创 面试题22:栈的压入、弹出队列

题目:输入两个整数序列,第一个序列表示栈的压入顺序,请判断第二个序列是否为该栈的弹出序列。假设压入栈的所有数字均不相等。例如序列1、2、3、4、5是某栈的压入序列,序列4、5、3、2、1是该压入序列对应的一个弹出序列,但4、3、5、1、2就不可能是该压入序列的弹出序列。分析:定义一个栈存放压入序列,判断的关键是看该栈的栈顶元素与要压入的下一个数字是否相等。测试:(1)基本功能测试:两个

2014-12-26 16:23:52 642

原创 面试题21:包含min函数的栈

题目:定义栈的数据结构,请在该类型中实现一个能够得到栈的最小元素的min函数。在该栈中,调用min、push、及pop的时间复杂度都是O(1)。分析:有时候用一个例子来帮助构思算法有时候会使问题变得简单。在这个问题中我们需要用到一个辅助栈。

2014-12-26 15:43:51 511

原创 面试题20:顺时针打印矩阵

题目:输入一个矩阵,按照从外向里顺时针的顺序依次打印出每个数字。分析:这个问题比较复杂,借助画出图形分析相对会简便一些。我们将矩阵想象成若干个圆,用一个循环来打印矩阵,每次打印矩阵中的一个圆。圆的起点是左上角(start,start),循环条件是columns>startX*2并且rows>rowsY*2。难点:for循环比较多,注意控制循环的结束条件。

2014-12-25 17:46:42 444

原创 面试题19:二叉树的镜像

题目:完成一个函数,输入一个二叉树,该函数输出它的镜像。分析:首先要清楚镜像的意思,然后用递归的方式实现起来比较简单。树的镜像是一个比较抽象的概念,应聘者可以用画图的方法把抽象的问题形象化,有助于快速找到解题思路。

2014-12-25 16:37:10 458

原创 面试题18:树的子结构

题目:输入两棵二叉树A和B,判断B是不是A的子结构。分析:分成两步:第一步在树A中找到和B的根结点一样的节点R;第二步判断以树A的R为根结点的子树是不是包含和B一样的结构。注意:树的题目有很多的指针操作,一定要分析和处理NULL的情况。

2014-12-25 14:20:24 412

原创 面试题17:合并两个排序的链表

题目:输入两个递增排序的链表,合并这两个链表并使新链表中的节点仍然是按照有序递增排列的。分析:这道题也是一道常见基础题,应该掌握。提升:尝试用递归的方法写出算法。用例:(1)功能测试:输入的两个链表具有多个节点,节点的值互不相同或者存在值相等的多个节点。(2)特殊测试:两个链表的一个或者头节点为NULL 指针,两个链表中只有一个节点。

2014-12-24 15:53:42 458

原创 面试题16:反转链表

题目:定义一个函数,输入一个链表的头节点,反转该链表并输出反转后链表的头结点。分析:这是一个比较基础也是面试官比较喜欢考察的题型,一定要掌握。测试用例:(1)链表头指针为NULL;(2)输入的链表只有一个节点;(3)输入的链表有多个节点。

2014-12-24 15:43:08 387

原创 面试题15:链表中倒数第k个节点

题目:输入一个链表,输出该链表中第k个节点。从1开始计数。分析:该题的常规解法就是定义两个指针,第二个指针先移动到k-1个节点,第一个指针指向头结点,然后一起往后移动知道第二个指针指向最后一个节点,第一个指针指向第k个节点。注意:有三点需要注意的地方:(1)当链表为空时;(2)当k=0时;(3)当k大于链表节点个数时。这三种情况在代码中一定要进行处理。

2014-12-24 15:34:41 438

原创 面试题14:调整数组顺序使奇数位于偶数前面

题目:输入一个整数数组,实现一个函数来调整该数组中数字的顺序,使得所有奇数位于数组的前半部分,所有偶数位于数组的后半部分。分析:这个题目比较简单,用两个指针分别指向数组的开头和结尾,两个指针分别往右移动和往左移动,当第一个指针小于第二个指针,且遇到第一个指针是偶数而第二个指针是奇数,则交换两个数值,直到一个指针不小于第二个指针。提升:降低函数的耦合性,使其具有更好的拓展性。

2014-12-24 14:37:17 495

原创 面试题13:在O(1)时间删除链表节点

题目:给定单向链表的头指针和一个节点指针,定义一个函数在O(1)时间删除该节点。该题目是经常会遇到的一种题型,但大多数人第一想到的删除节点的方法是找到节点的前一个节点,让其指向删除节点的下一个节点,然后删除该节点,但是这样做的时间复杂度是O(n),不符合面试官的要求。分析:分成三种情况进行分析:(1)删除节点不是尾节点:找到删除节点的下一个节点next,将next节点的值赋值给删除节点

2014-12-24 14:03:36 573

原创 题型分类------其他类(doing)

1. Best Time to Buy and Sell Stock2. Best Time to Buy and Sell Stock II3. Pascal's Triangle4. Roman to Integer5. Integer to Roman6. LRU Cache7. Word Break II8. Word Break: 动态规划9. C

2014-11-14 10:55:32 527

原创 题型分析------数字类(done)

1. Palindrome Number2. Add Two Numbers3. Permutations4. Gray Code5. Sqrt(x)6. Plus One7. Valid Number8. Pow(x, n)9. Permutations II10. Divide Two Integers11. 4Sum12. 3Sum Close

2014-11-14 10:54:36 528

原创 题型分类------字符串和数组(Doing)

1. [1]. Reverse Words in a String:空格的处理2. Evaluate Reverse Polish Notation: 栈3. Single Number II 位运算4. Single Number 位运算5. Longest Common Prefix : 平常的字符串比较6. Regular Expression Matching : 递归

2014-11-14 10:53:31 512

原创 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 the values along the path equals the given sum.For example:Given the below binary tree and sum

2014-10-29 10:31:06 476

原创 Leetcode-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 and the nodes have the same value.

2014-10-28 11:22:31 435

原创 Leetcode-Symmetric Tree

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \3 4 4 3But the f

2014-10-28 10:39:46 489

转载 Eclipse调试技巧

1、 条件断点断点大家都比较熟悉,在Eclipse Java 编辑区的行头双击就会得到一个断点,代码会运行到此处时停止。条件断点,顾名思义就是一个有一定条件的断点,只有满足了用户设置的条件,代码才会在运行到断点处时停止。在断点处点击鼠标右键,选择最后一个"Breakpoint Properties"断点的属性界面及各个选项的意思如下图,2、 

2014-10-27 11:10:45 362

原创 Leetcode-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 leaf node.思路:z

2014-10-23 11:03:53 542

原创 Leetcode-Minimum Depth of Binary Tree

Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.

2014-10-23 10:50:26 477

原创 Leetcode-Binary Tree Level Order Traversal II

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-10-23 09:50:00 454

原创 Leetcode-Binary Tree Level Order Traversal

Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree {3,9,20,#,#,15,7}, 3 / \ 9 20

2014-10-22 15:09:14 432

原创 Leetcode-Binary Tree Postorder Traversal

Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3,2,1].Note: Recursive solut

2014-10-17 11:08:57 536

原创 Leetcode-Binary Tree Inorder Traversal

Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,3,2].Note: Recursive solutio

2014-10-15 12:19:41 392

原创 Leetcode-Binary Tree Preorder Traversal

Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3},1\2/3return [1,2,3].Note: Recursive solution is trivial, could you

2014-10-15 11:04:24 378

原创 Leetcode分类-树

题型分类------树一、树的遍历1. Binary Tree Preorder Traversal: 使用递归和非递归 前序遍历,主要考察非递归;2. Binary Tree Inorder Traversal: 使用递归和非递归 中序遍历,主要考察非递归;3. Binary Tree Postorder Traversal: 使用递归和非递归 后序遍历,主要考察非递归;

2014-10-15 09:19:06 537

原创 Leetcode-Swap Nodes in Pairs

Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant space. Y

2014-10-14 20:15:05 349

原创 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 together the nodes of the first two lists.AC代码:

2014-10-14 11:20:39 394

原创 Leetcode-Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return its head.For example,Given linked list: 1->2->3->4->5, and n = 2.After removing the second node from the end, the l

2014-10-13 11:02:06 418

原创 Leetcode-Remove Duplicates from Sorted List II

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2->3->3->4->4->5, return 1->2->5.Given 1->1-

2014-10-13 10:31:08 437

原创 Leetcode-Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return 1->2->3.AC代码:

2014-10-12 15:19:20 478

原创 Leetcode-Rotate List

Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->NULL.题目大衣

2014-10-12 11:48:11 415

原创 Leetcode-Reverse Nodes in k-Group

Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is

2014-10-11 10:37:54 453

hadoop权威指南(中文第2版)

hadoop权威指南(中文第2版)完整版,共有16章,全书讲解详细,适合hadoop初学者。

2014-07-10

程序员面试精选100题

这里选取了程序员面试常考的100个编程题,有问题,有分析,对于程序讲解非常透彻,是程序员面试准备的好材料。

2013-05-08

深入浅出设计模式(中文版)

浅显易懂的讲解了软件设计中的23种设计模式,文档中还有代码解释,非常易懂实用,是个值得收藏的东东~~

2013-05-08

程序员面试宝典完整电子版

程序员面试宝典 完整电子版 pdf格式 书里涵盖了很多程序员的面试求职技巧,很值得一看

2013-05-07

RUP模板-文档

很全的RUP开发文档 包括英文和中文的文档都有

2013-05-02

C#-文件批处理器

用C#语言编写的一个文件批处理器,是源代码,运行IDE时VC08以上环境适合于毕业设计。

2013-04-19

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

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