自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(24)
  • 收藏
  • 关注

原创 convert-sorted-array-to-binary-search-tree

import java.util.*;public class Solution {    public TreeNode sortedArrayToBST(int[] num) {        if(num==null||num.length==0)            return null;        if(num.length==1)           

2016-06-30 08:08:18 438

原创 best-time-to-buy-and-sell-stock-ii

有更简单的方法public class Solution {    public int maxProfit(int[] prices) {        if(prices.length            return 0;        int max=0;int min=prices[0];int M=0;        for(int i=1;i     

2016-06-29 21:16:33 386

原创 longest-consecutive-sequence

import java.util.*;public class Solution {    public int longestConsecutive(int[] num) {        Set set =new HashSet();        for(int i=0;i        {            set.add(num[i]);        }

2016-06-29 20:47:07 296

原创 best-time-to-buy-and-sell-stock

动态规划public class Solution {    public int maxProfit(int[] prices) {        if(prices.length            {            return 0;        }      int min=prices[0],max=0;        for(int i=1;

2016-06-29 15:55:45 284

原创 merge-sorted-array

(1),开辟新数组,覆盖import java.util.*;public class Solution {    public void merge(int A[], int m, int B[], int n) {       int[] a=new int[m+n];                    System.arraycopy(A,0,a,0,m); 

2016-06-29 14:37:45 224

原创 sort-colors

public class Solution {    public void sortColors(int[] A) {        int sum=0;        int sum1=0;        for(int i=0;i            {                            sum=sum+A[i];           

2016-06-29 11:28:24 419

原创 search-a-2d-matrix

(1)二分法public class Solution {    public boolean searchMatrix(int[][] matrix, int target) {        if(matrix==null || matrix.length==0 || matrix[0].length==0)             return false;       

2016-06-29 11:07:13 260

原创 plus-one

public class Solution {    public int[] plusOne(int[] digits) {        int i=digits.length-1;        while(i>=0)            {            if(digits[i]==9)                {               

2016-06-29 09:33:41 314

原创 spiral-matrix-ii

public class Solution {    public int[][] generateMatrix(int n) {        int res[][] =new int [n][n];        if(n==0)            {            return res;        }        int x=0,y=0,N=n-

2016-06-29 08:00:00 260

原创 leetcode 28: Merge Intervals

import java.util.*;public class Solution {      public ArrayList merge(ArrayList intervals) {          // Start typing your Java solution below          // DO NOT write main() function     

2016-06-28 20:49:38 244

原创 spiral-matrix

import java.util.*;public class Solution {    public ArrayList spiralOrder(int[][] matrix) {        ArrayListjieguo = new ArrayList();        int x=0;        int y=0;        int X_MAX=matr

2016-06-28 20:05:30 247

原创 selenium+java 的Web测试

之前写过一个appium的app测试今天做了一个基于selenium2 的Web测试,打算写一下,记录一下。测试对象:京东商城登录页面测试功能:1.点击“忘记密码”,是否跳转到密码找回页面2.输入用户名,点击登录,是否提示“请输入密码”3.不输入用户名,点击登录,是否显示“请输入用户名”4.输入错误不合逻辑的用户名和密码,是否显示“该用户不存在”5.输入正确

2016-06-27 08:19:51 2339

原创 6 rotate-image

You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?图像顺时针90度旋转1.找规律:发现   可以将   matrix[i][j]=m

2016-06-24 18:35:52 287

转载 牛客 数据库

1.(1)基本概念   ① 属性和域:    每个事物有很多属性,每个属性对应的取值范围叫做域,所有对域都是原子数据(第一范式)   ② 相关名词    n元关系:R(D1,D2,D3...Dn)是n元关系,其中关系属性的个数称为“元数”,元组的个数称为“基 数”,也就是记录值。    候选码:若关系中某一个属性或者属性组的值可以唯一的标识一个元组,

2016-06-23 13:05:18 11869

转载 数组 题目

1.数组通常具有的两种基本操作是查找和修改 2.已知数组D的定义是int D[4][8];,现在需要把这个数组作为实参传递给一个函数进行处理。下列说明汇总可以作为对应的形参变量说明的是()。int D[4][]int *s[8]int(*s)[8]int D[][8]C,Dint *s[8]; //定义一个指针

2016-06-22 21:38:24 1259

原创 5

next-permutationImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearran

2016-06-22 16:27:18 390

原创 leetcode(4)remove-element

Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't matter what you leave beyond the new length.

2016-06-22 14:43:02 254

原创 leetcode(3)remove-duplicates-from-sorted-array

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with

2016-06-22 10:24:24 279

原创 leetcode(2)3sum-closest

题目:Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have

2016-06-22 09:46:59 243

原创 leetcode(1)container-with-most-water

题目 :container-with-most-waterGiven n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of lin

2016-06-22 08:29:55 278

转载 牛客 笔记

1.下列关于单模光纤与多模光纤的区别描述错误的是?单模光纤传输模式单一,因此干扰小,带宽大,适合长距离传输多模光纤是在一条光纤中传输多条光路,适合短距离传输2.A,SSL(Secure Sockets Layer 安全套接层),是https采用的加密通道  在http 和  TCP中间B,IPSec(InternetProtocolSecurity)用以提供公用和专

2016-06-20 18:47:12 2423

原创 【水】2016.06.17

1.刚写了好多,不知道按了啥,退了出去,心情不好2.今天去面试,拿着昨天做的简单测试脚本和环境,面试官两人,一个西安技术负责人,一个测试负责人。表现一般,掩饰后,提的了些问题,跟大家分享一下2.1 导入了一个org.seleium.webdriver 包是干啥用的。我回答:测试过程中的一些实现方法在包里。2.2 你用的元素定位都是些BYNAME,BYID之类的,万一UI直接

2016-06-17 19:19:13 299

原创 实操:安卓app测试 基于 eclipse + AVD +appium

第一个测试项目,来源一家公司的面试实操题3.4  进行编码(我将代码复制如下)package com.jisuanqitest.appium;//我的包名import io.appium.java_client.AppiumDriver;import io.appium.java_client.android.AndroidDriver;import io.

2016-06-16 16:06:48 1040

原创

截止2016.06.15,我已经把软件测试理论部分(javase,mysql,linux,shell,计算机网络,数据结构,软件测基础理论,loadrunner,qtp,appium,等等)进行了学习和复习,从即日起,要开始进行实操训练和编码,还有最重要的刷题。决定开个技术博客,记录自己在实际操作编码过程中遇到的问题以及对问题自己的见解,希望与喜欢软件测试或者也打算求职互联网软件测试岗位的小伙伴分

2016-06-16 15:47:56 559

空空如也

空空如也

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

TA关注的人

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