摘要: 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. 阅读全文
posted @ 2017-07-02 23:52 王大咩的图书馆 阅读(316) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted integer array, find the first missing positive integer. For example,Given[1,2,0]return3,and[3,4,-1,1]return2. Your algorithm should 阅读全文
posted @ 2017-07-02 22:36 王大咩的图书馆 阅读(205) 评论(0) 推荐(0) 编辑
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2017-07-02 15:55 王大咩的图书馆 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space to hold additional elements 阅读全文
posted @ 2017-07-02 10:27 王大咩的图书馆 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array A =[1,1,1,2,2,3], Your function should 阅读全文
posted @ 2017-07-02 01:26 王大咩的图书馆 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 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 fo 阅读全文
posted @ 2017-07-01 17:17 王大咩的图书馆 阅读(230) 评论(0) 推荐(0) 编辑
摘要: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, 阅读全文
posted @ 2017-07-01 16:36 王大咩的图书馆 阅读(411) 评论(0) 推荐(0) 编辑
摘要: Given a collection of intervals, merge all overlapping intervals. For example,Given[1,3],[2,6],[8,10],[15,18],return[1,6],[8,10],[15,18]. 题意:给定一系列区间,合 阅读全文
posted @ 2017-07-01 11:19 王大咩的图书馆 阅读(280) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, generate a square matrix filled with elements from 1 to n 2 in spiral order. For example,Given n =3, You should return the followi 阅读全文
posted @ 2017-07-01 10:29 王大咩的图书馆 阅读(230) 评论(0) 推荐(1) 编辑
摘要: 本文来自实验楼相关部分的文档和实验操作过程。 一、MySQL简介 MySQL是一种关系数据库管理系统,关系数据库将数据保存在不同的表中,而不是将所有数据放在一个大仓库内,提高了速度并提高了灵活性。MySQL所使用的SQL语言是用于访问数据库的最常用标准化语言,由于其体积小、速度快、总体拥有成本低,尤 阅读全文
posted @ 2017-07-01 00:35 王大咩的图书馆 阅读(428) 评论(0) 推荐(0) 编辑
摘要: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example,Given the following matrix: You s 阅读全文
posted @ 2017-06-30 22:20 王大咩的图书馆 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 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? 方法一:常规思路: 将图 阅读全文
posted @ 2017-06-30 21:39 王大咩的图书馆 阅读(345) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted f 阅读全文
posted @ 2017-06-30 13:14 王大咩的图书馆 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Given a number represented as an array of digits, plus one to the number. 题意:给定数以数组的形式存储,然后计算该数加1的值。 思路:一般遇到这种以数组,或字符串形式的数相加的问题,都是从右往左遍历(因为,数的低位在右边),用 阅读全文
posted @ 2017-06-30 09:45 王大咩的图书馆 阅读(188) 评论(0) 推荐(1) 编辑
摘要: 文来自对实验楼的实验文档和相应操作过程的整理。 涉及的内容为:索引、视图、导入和导出、备份和恢复。 一、索引 索引是一种与表有关的结构,相当于书的目录,可以根据目录中的页码快速找到所需的内容。 当表中有大量记录时,若要对表进行查询,没有索引的情况是全表搜索:将所有记录一一取出,和查询条件进行一一对比 阅读全文
posted @ 2017-06-30 00:37 王大咩的图书馆 阅读(242) 评论(1) 推荐(1) 编辑