自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

卷毛的博客

一位20

  • 博客(30)
  • 问答 (1)
  • 收藏
  • 关注

原创 Git从安装到精通

前言:公司用Git,需要从头学习,下面是教程链接,学习笔记会持续更新在个人分类Git相关里面。教程链接:https://git-scm.com/book/zh/v2

2018-04-11 10:31:22 149

原创 优先队列(堆)

    本文将概括性描述优先队列ADT,只对基本的堆数据结构做简要总结,不涉及左式堆,d-堆,斜堆,二项队列等高级数据结构。(算法入门级的总结,欢迎批评指正,根据《数据结构与算法(JAVA语言描述)》一书总结)   优先队列1.模型优先队列是至少支持两种操作的数据结构:insert 与 deleteMin。前者等价于队列中的入队,后者等价于出队。此模型在贪婪算法与外部排序中有较多应用。2.二叉堆二...

2018-02-24 17:39:12 432

原创 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-&...

2018-02-11 15:14:42 130

原创 Search a 2D Matrix:二分查找二维数组

二分查找二维数组

2018-02-11 14:45:11 230

原创 Climbing Stairs:动态规划

You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note: Given n will be a positive

2018-02-11 14:33:22 336

原创 Unique Paths && Unique Paths|| 尾递归的简化,数学排列组合,动态规划

动态规划

2018-02-11 14:15:24 306

原创 Jump Game(55题):贪心算法,数组

Jump Game

2018-02-11 13:43:21 257

原创 树:98. Validate Binary Search Tree

Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes with keysless than the node's key.The

2018-02-03 17:18:24 126

原创 数学:43 : Multiply Strings

字符串相乘问题

2018-02-03 14:40:06 122

原创 601. Human Traffic of Stadium

X city built a new stadium, each day many people visit it and the stats are saved as these columns:id, date, peoplePlease write a query to display the records which have 3 or more consecutive rows

2018-01-31 13:58:38 261

原创 262. Trips and Users

The Trips table holds all taxi trips. Each trip has a unique Id, while Client_Id and Driver_Id are both foreign keys to the Users_Id at theUsers table. Status is an ENUM type of (‘completed’, ‘cance

2018-01-31 13:12:42 209

原创 185. Department Top Three Salaries

The Employee table holds all employees. Every employee has an Id, and there is also a column for the department Id.+----+-------+--------+--------------+| Id | Name | Salary | DepartmentId |+----

2018-01-29 16:06:23 326

原创 数据库:184. Department Highest Salary

The Employee table holds all employees. Every employee has an Id, a salary, and there is also a column for the department Id.+----+-------+--------+--------------+| Id | Name | Salary | Department

2018-01-29 15:01:26 360

原创 1.1数组和链表:61. Rotate List(Leetocde)

Given a list, rotate the list to the right by k places, where k is non-negativeExample:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->NULL.这道题是我做的比较满意的,因为用到了经验,说一下我自己的解法:大众

2017-11-08 16:19:59 159

原创 1.4字符串:60.Permutation Sequence(Leetocde)

The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie, for n = 3):"123""132""213""231""312

2017-11-08 15:48:58 249

原创 1.1数组和链表:33. Search in Rotated Sorted Array(Leetcode)

Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If foun

2017-11-07 13:39:15 118

原创 1.1数组和链表:19. Remove Nth Node From End of List(Leetcode)

Given a linked list, remove the nth node from the end of list and return its head.题目大意:给定一个链表,删除它倒数第n位的节点并重新返回此链表博主想到的方法比较简单,先遍历一次求出链表的长度,确定是正数第几个节点被删除,然后二次遍历删除它方法一:class Solution { publ

2017-11-07 11:20:11 134

原创 197. Rising Temperature(Lettcode)

Given a Weather table, write a SQL query to find all dates' Ids with higher temperature compared to its previous (yesterday's) dates.+---------+------------+------------------+| Id(INT) | Date(DA

2017-11-05 16:39:25 203

原创 196. Delete Duplicate Emails

Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id.+----+------------------+| Id | Email |+----+-----

2017-11-05 15:59:52 212

转载 1.1数组和链表:189. Rotate Array(Leetcode)

Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note:Try to come up as many solutions as yo

2017-11-05 14:54:10 157

转载 SQL中distinct的用法

转载至 http://www.cnblogs.com/rainman/archive/2013/05/03/3058451.html在表中,可能会包含重复值。这并不成问题,不过,有时您也许希望仅仅列出不同(distinct)的值。关键词 distinct用于返回唯一不同的值。表A:表B:1.作用于单列select distinct name

2017-11-03 15:09:40 4368

原创 182. Duplicate Emails(Lettcode)

Write a SQL query to find all duplicate emails in a table named Person.+----+---------+| Id | Email |+----+---------+| 1 | [email protected] || 2 | [email protected] || 3 | [email protected] |+----+---------+For

2017-11-03 14:56:45 163

原创 181. Employees Earning More Than Their Managers(Lettcode)

The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id.+----+-------+--------+-----------+| Id | Name | Salary |

2017-11-03 14:18:53 156

转载 176. Second Highest Salary(Leetcode)

文章出处:http://www.cnblogs.com/grandyang/p/5348961.htmlWrite a SQL query to get the second highest salary from the Employee table.+----+--------+| Id | Salary |+----+--------+| 1 | 100 || 2

2017-11-03 13:05:53 243

转载 MySQL多表查询

1、内联接(典型的联接运算,使用像 =  或 <> 之类的比较运算符)。包括相等联接和自然联接。     内联接使用比较运算符根据每个表共有的列的值匹配两个表中的行。例如,检索 students和courses表中学生标识号相同的所有行。2、外联接。外联接可以是左向外联接、右向外联接或完整外部联接。     在 FROM子句中指定外联接时,可以由下列几组关键字中的一组指定:

2017-11-03 12:44:47 135

原创 1.1数组和链表:160. Intersection of Two Linked Lists(Leetcode)

Write a program tofind the node at which the intersection of two singly linked lists begins. Notes:If the two linked lists have no intersection at all, return null.The linked lists must reta

2017-11-02 15:08:35 117

原创 3.1 数学:172.Factorial Trailing Zeroes(Leetcode)

数学题,大致含义求N的阶乘结果后0的个数先贴代码:public int trailingZeroes(int n) { int factor = 5,countOfZeros = 0; while(n / factor > 0){ countOfZeros += n / factor; n /= 5;

2017-11-02 14:31:52 102

原创 1.1 数组和链表:169.Majority Element (Leetcode)

一道经典的面试题,找出数组中出现半数以上的元素(不包含半数)。先贴代码:public int majorityElement(int[] nums) { int result = 0,count = 0; for(int i = 0;i < nums.length;i ++){ if(count == 0){

2017-11-02 13:47:25 126

原创 1.4 字符串:168. Excel Sheet Column Title(Leetcode)

1.4 字符串题目要求:按EXCEL的序A~Z,AA~ZZ,...将给定正整数转化为此序列i.e: 1 .....  A,2.....B,26......Z,27.......AA.public String convertToTitle(int n) { String ret = ""; while(n > 0)

2017-11-02 10:46:18 193

原创 关于LINUX系统下部署javaweb项目失败报错404的问题

本人第一次写博文,主要是因为一个小问题让我浪费了一下午的时间。今天跟着视频学linux基础,最后在linux下部署web项目出现了问题,服务器报404错误,然后就一点一点开始百度找问题。然后发现因为视频少了一节课,导致jdk没有下载并配置。。。。但是在我配置完环境变量以后还是不行,然后就开始无尽的百度,有的说是访问权限问题,有的说是配置文件问题。。。然后我学着网上大神所说的打开了日

2017-08-27 19:27:59 8180 2

空空如也

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

TA关注的人

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