自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

不想做菜鸟的小螃蟹

菜鸟成长记录,欢迎批评指正

  • 博客(18)
  • 收藏
  • 关注

原创 【Leetcode】532. K-diff Pairs in an Array(Easy)

1.题目Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an integer pair (i, j), where i and j are both number...

2018-02-23 18:20:58 173

原创 【Leetcode】482. License Key Formatting(Easy)

1.题目You are given a license key represented as a string S which consists only alphanumeric character and dashes. The string is separated into N+1 groups by N dashes.Given a number K, we would want to ...

2018-02-19 11:48:59 237

原创 【Java】两层for循环 break跳出

1.break跳出最里面一层for循环如下例public class DoubleLoop { public static void main(String args[]){ for(int i=0;i<5;i++){ System.out.println("i="+i); for(int j=10;j<20;j++){ System.out.println(...

2018-02-11 19:23:58 20961 3

原创 【Leetcode】479. Largest Palindrome Product(Easy)

1.题目Find the largest palindrome made from the product of two n-digit numbers.Since the result could be very large, you should return the largest palindrome mod 1337.Example:Input: 2Output: 987Explanat...

2018-02-11 19:08:02 278

原创 【Kindle】Kindle免费推送网

Step 1.登录kindle推(集思会)网站 http://www.kindlepush.com,进行注册登录。Step 2.点击进入 个人中心-账号设置。需要设置两个邮箱:Step 3. 登录亚马逊官网 进入 我的账户-管理我的内容和设备-设置-个人文档Step 4. 回到推送网站,选择图书进行推送将kindle连接至WiFi网络,稍等1-2分钟,网站限制每天推送2本,感觉已经很棒啦!...

2018-02-11 17:56:33 9002

原创 【Leetcode】458. Poor Pigs(Easy)

1.题目There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all look the same. If a pig drinks that poison it will die within 15 minutes. What is the min...

2018-02-11 14:45:59 282

原创 【Leetcode】443. String Compression (Easy)

1.题目Given an array of characters, compress it in-place.The length after compression must always be smaller than or equal to the original array.Every element of the array should be a character (not int...

2018-02-06 21:45:57 478

原创 【Leetcode】268. Missing Number(Easy)

1.题目Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.翻译:给定一个包含从0,1,2...,n中选取出的n个不同的数字,找到数组中被忽略的数字。Example 1Input:

2018-02-06 21:01:27 205

原创 【微信小程序】位置之重新授权

目前开发的小程序需要应用到一个获取经纬度的功能,授权的部分有点繁琐,记录一下。1.使用 wx.getLocation()可以获取用户的位置信息,第一次会弹出微信原生的modal提问用户是否授权,之后不会再次弹出。第一次我的解决方案是,每次要定位之前getSetting,查看用户是否已授权。如果未授权执行openSetting引导用户开启授权。代码如下:studentCheckIn: f

2018-02-03 19:26:37 8562

原创 【Leetcode】196. Delete Duplicate Emails (Easy)

1.题目Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails based on its smallest Id.翻译:写一个SQL语句删掉Person表中,所有email重复的实体(相同的保留一个),只保留I的最小的唯

2018-02-02 16:56:16 263

原创 【Leetcode】183. Customers Who Never Order (Easy)

1.题目Suppose that a website contains two tables, the Customers table and the Orders table. Write a SQL query to find all customers who never order anything.翻译:假设一个网站包含两个表,Customers表和Orders表

2018-02-02 16:26:12 319

原创 【Leetcode】182. Duplicate Emails (Easy)

1.题目Write a SQL query to find all duplicate emails in a table named Person.翻译:写一个SQL查询语句,找出Person表中所有重复的Email。+----+---------+| Id | Email |+----+---------+| 1 | [email protected] || 2 | c@d

2018-02-02 16:17:09 226

原创 【Leetcode】181. Employees Earning More Than Their Managers (Easy)

1.题目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

2018-02-01 17:40:23 221

原创 【Leetcode】35. Search Insert Position (Easy)

1.题目Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in

2018-02-01 17:06:54 184

原创 【Leetcode】176. Second Highest Salary (Easy)

1.题目Write a SQL query to get the second highest salary from the Employee table.+----+--------+| Id | Salary |+----+--------+| 1 | 100 || 2 | 200 || 3 | 300 |+----+--------+

2018-02-01 12:43:02 273

原创 【Leetcode】175. Combine Two Tables(Easy)

1.题目Table: Person+-------------+---------+| Column Name | Type |+-------------+---------+| PersonId | int || FirstName | varchar || LastName | varchar |+-------------+----

2018-02-01 12:25:23 478

原创 【Leetcode】167. Two Sum II - Input array is sorted(Easy)

1.题目Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the

2018-02-01 12:05:51 229

原创 【Leetcode】53. Maximum Subarray(Easy)

1.题目Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1,2,1,-5,4],the contiguous subarray [4,

2018-02-01 11:37:01 222

空空如也

空空如也

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

TA关注的人

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