- 博客(279)
- 资源 (1)
- 收藏
- 关注
原创 【LeetCode】355. Design Twitter
355. Design Twitter My Submissions QuestionEditorial SolutionTotal Accepted: 731 Total Submissions: 3056 Difficulty: MediumDesign a simplified version of Twitter where users can post tweets, follo
2016-06-14 14:23:52 1066
原创 【LeetCode】357. Count Numbers with Unique Digits
357. Count Numbers with Unique Digits My Submissions QuestionEditorial SolutionTotal Accepted: 1190 Total Submissions: 2830 Difficulty: MediumGiven a non-negative integer n, count all numbers with
2016-06-14 14:19:59 845
转载 缓存穿透、缓存并发、缓存失效之思路变迁
我们在用缓存的时候,不管是Redis或者Memcached,基本上会通用遇到以下三个问题:缓存穿透缓存并发缓存失效一、缓存穿透 注:上面三个图会有什么问题呢?我们在项目中使用缓存通常都是先检查缓存中是否存在,如果存在直接返回缓存内容,如果不存在就直接查询数据库然后再缓存查询结果返回。这个时候如果我们查询的某一个数
2016-05-16 11:09:19 606
原创 【LeetCode】300 Longest Increasing Subsequence
Longest Increasing SubsequenceTotal Accepted: 8193 Total Submissions: 26128 Difficulty: MediumGiven an unsorted array of integers, find the length of longest increasing subsequence.For example,
2015-11-30 18:28:59 646
原创 【LeetCode】Game of Life
Game of LifeMy Submissions Question Solution Total Accepted: 3524 Total Submissions: 11205 Difficulty: MediumAccording to the Wikipedia's article: "The Game of Life, also known simply as Life, i
2015-10-14 10:48:39 2245
原创 【LeetCode】Move Zeroes
Move ZeroesMy Submissions Question Solution Total Accepted: 9333 Total Submissions: 21879 Difficulty: EasyGiven an array nums, write a function to move all 0's to the end of it while maintaining
2015-09-24 17:27:37 1201
原创 【LeetCode】Expression Add Operators
Expression Add Operators My Submissions Question Solution Total Accepted: 1506 Total Submissions: 8547 Difficulty: HardGiven a string that contains only digits 0-9 and a target value, return all
2015-09-24 17:19:02 3724
转载 【Java】JDK6和JDK7中String的substring()方法及其差异
翻译人员: 铁锚翻译日期: 2013年11月2日原文链接: The substring() Method in JDK 6 and JDK 7 在JDK6与JDK7这两个版本中,substring(int beginIndex, int endIndex)方法是不同的. 了解两个版本间的区别可以让你更好地使用它们. 为简单起见,本文中以 substring() 表示 subs
2015-09-07 15:35:14 711
原创 【LeetCode】268 Missing Number
Missing Number Total Accepted: 579 Total Submissions: 1615 My Submissions Question Solution Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing fr
2015-08-24 10:30:15 935
原创 【LeetCode】242 Valid Anagram
Valid Anagram Total Accepted: 4232 Total Submissions: 11283 My Submissions Question Solution Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "a
2015-08-03 10:41:08 1841
原创 【LeetCode】240 Search a 2D Matrix II
Search a 2D Matrix II Total Accepted: 928 Total Submissions: 2932 My Submissions Question Solution Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the fo
2015-07-23 11:03:34 599
原创 【LeetCode】Python requests模拟Leetcode登陆
查看登陆参数,https://leetcode.com/accounts/login/ 通过form表单post数据。查看登录时post的一些参数。 headers data **requests模拟登陆,代码在这里:# !/usr/bin/env python# -*- coding: utf-8 -*-# author: wangzhenqing <wangzhenqing
2015-07-17 18:23:16 1595
原创 【LeetCode】237 Product of Array Except Self
Product of Array Except SelfTotal Accepted: 388 Total Submissions: 1017 My Submissions Question Solution Given an array of n integers where n > 1, nums, return an array output such that output[i]
2015-07-16 10:38:20 900
原创 【LeetCode】236 Lowest Common Ancestor of a Binary Tree
Lowest Common Ancestor of a Binary TreeTotal Accepted: 1207 Total Submissions: 4143 My Submissions Question Solution Given a binary tree, find the lowest common ancestor (LCA) of two given nodes i
2015-07-13 17:51:14 1555
原创 【LeetCode】235 Lowest Common Ancestor of a Binary Search Tree
Lowest Common Ancestor of a Binary Search TreeTotal Accepted: 3808 Total Submissions: 9820 My Submissions Question Solution Given a binary search tree (BST), find the lowest common ancestor (LCA)
2015-07-13 17:39:13 1097
原创 【LeetCode】234 Palindrome Linked List
Palindrome Linked ListTotal Accepted: 1116 Total Submissions: 4295 My Submissions Question Solution Given a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n
2015-07-10 16:33:05 3654
原创 【九度】抓取九度AC所有代码以及在CSDN的解题思路链接形成文件提交至github
前言抓取在九度AC的所有代码。抓取每个题目在CSDN解题思路的链接地址。输出为多个Java/C++文件。提交至github。抓取代码目前题目编号为1001至1557。从该题目编号依次遍历url。url格式为:http://ac.jobdu.com/problem.php?pid=1000即前缀加题目编号。获取每个人的提交历史。**url格式为: http://ac.j
2015-07-01 10:13:37 1232
原创 【LeetCode】Basic Calculator && Basic Calculator II
1、Basic Calculator Total Accepted: 3726 Total Submissions: 24053 My Submissions Question Solution Implement a basic calculator to evaluate a simple expression string.The expression string may co
2015-06-24 11:01:51 3959
转载 【Python】Python Requests快速入门
快速上手迫不及待了吗?本页内容为如何入门Requests提供了很好的指引。其假设你已经安装了Requests。如果还没有, 去 安装 一节看看吧。首先,确认一下:Requests 已安装Requests是 最新的让我们从一些简单的示例开始吧。发送请求使用Requests发送网络请求非常简单。一开始要导入Requests模块:>
2015-06-10 16:03:14 765 1
原创 【LeetCode】Maximal Rectangle && Maximal Square
1、Maximal Rectangle Total Accepted: 24875 Total Submissions: 113379 My Submissions Question Solution Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all o
2015-06-05 17:56:28 1165
转载 【运维】SaltStack 初探
文章来源: http://www.oschina.net/translate/getting-started-salt-stack-other-configuration-management-system-built-python原文: http://www.linuxjournal.com/content/getting-started-salt-stack-other-configurati
2015-06-02 11:33:07 792
原创 【LeetCode】Minimum Size Subarray Sum
Minimum Size Subarray Sum Total Accepted: 5312 Total Submissions: 22940 My Submissions Question Solution Given an array of n positive integers and a positive integer s, find the minimal length of
2015-06-02 11:03:09 754
原创 【LeetCode】Number of Islands
Number of Islands Total Accepted: 8945 Total Submissions: 41107 My Submissions Question Solution Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surr
2015-06-02 09:28:51 807
原创 【九度】2014年王道论坛计算机考研机试全真模拟考试解题报告
1、题目1553:时钟时间限制:1 秒内存限制:128 兆特殊判题:否提交:764解决:321题目描述:如图,给定任意时刻,求时针和分针的夹角(劣弧所对应的角)。输入:输入包含多组测试数据,每组测试数据由一个按hh:mm表示的时刻组成。输出:对于每组测试数据,输出一个浮点数,代表时针和分针的夹角(劣弧对应的角),用角度表示,结果保留两位小数。样例输入:03:
2015-05-26 09:56:09 2621 1
原创 【LeetCode】Rising Temperature
Rising Temperature Total Accepted: 2437 Total Submissions: 8879 My Submissions Question Solution Given a Weather table, write a SQL query to find all dates' Ids with higher temperature compared
2015-05-26 09:36:51 700
原创 【Linux】服务器之间传文件。
在待传文件的目录下启动python -m SimpleHTTPServer 默认端口 8000在客户端直接使用get可以下载文件。wget http://ip地址:8000/file.sql
2015-04-07 17:19:23 499
原创 【Error】SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
错误信息如下:SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".SLF4J: Defaulting to no-operation (NOP) logger implementationSLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder
2015-03-19 18:17:00 767
原创 【Log】Log4j以及commons-logging使用
1、单独使用log4j1)、项目结构: 2)、OnlyLog4jTest内容package com.log4j.wzq;import org.apache.log4j.Logger;/** * @Author:wangzhenqing * @Date:2015年03月16日15:32:18 * @Description:只有log4j,测试类
2015-03-16 15:38:06 1046
转载 【Quartz】用 Quartz 进行作业调度
现代的 Web 应用程序框架在范围和复杂性方面都有所发展,应用程序的每个底层组件也必须相应地发展。作业调度是现代系统中对 Java 应用程序的一般要求,而且也是对 Java 开发人员一贯的要求。虽然目前的调度技术比起原始的数据库触发器标志和独立的调度器线程来说,已经发展了许多,但是作业调度仍然不是个小问题。对这个问题最合适的解决方案就是来自 OpenSymphony 的 Quartz API。
2015-03-13 17:41:15 512
转载 【Linux/Unix】每天一个linux命令(50):crontab命令
前一天学习了 at 命令是针对仅运行一次的任务,循环运行的例行性计划任务,linux系统则是由 cron (crond) 这个系统服务来控制的。Linux 系统上面原本就有非常多的计划性工作,因此这个系统服务是默认启动的。另外, 由于使用者自己也可以设置计划任务,所以, Linux 系统也提供了使用者控制计划任务的命令 :crontab 命令。一、crond简介crond是linu
2015-03-10 15:02:01 666
原创 【LeetCode】Intersection of Two Linked Lists
1、【LeetCode】Intersection of Two Linked Lists Total Accepted: 16034 Total Submissions: 58142 My Submissions Question Solution Write a program to find the node at which the intersection of two singl
2015-02-13 16:26:10 784
原创 【LeetCode】Sudoku Solver
Sudoku Solver Total Accepted: 20609 Total Submissions: 96910 My Submissions Question Solution Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the
2015-02-04 22:54:52 832
原创 【LeetCode】Valid Sudoku
Valid Sudoku Total Accepted: 25228 Total Submissions: 92921 My Submissions Question Solution Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be pa
2015-02-04 18:12:29 810
原创 【LeetCode】Largest Rectangle in Histogram
Largest Rectangle in Histogram Total Accepted: 26683 Total Submissions: 120953 My Submissions Question Solution Given n non-negative integers representing the histogram's bar height where the widt
2015-01-27 18:58:12 1097
原创 【Error】org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persist
java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persistence.spi.PersistenceProvider解决方案删掉webapp下的WEB-INFO/hibernate-jpa-2.0-api-1.0.1.Final.jar
2015-01-27 14:19:27 2286
原创 【LeetCode】Department Highest Salary && Department Top Three Salaries
1、Department Highest SalaryTotal Accepted: 367 Total Submissions: 1887 My Submissions Question Solution The Employee table holds all employees. Every Employee has an Id, a salary, and there is
2015-01-27 10:51:04 1275
原创 【LeetCode】Min Stack && 【九度】题目1522:包含min函数的栈
1、【LeetCode】Min StackMin StackTotal Accepted: 15869 Total Submissions: 102810 My Submissions Question Solution Design a stack that supports push, pop, top, and retrieving the minimum element in
2015-01-24 21:13:36 791
原创 【PostgresQL】PostgresQL 基本操作
1、登陆PostgresQLpsql -U postgres -d postgres2、创建表userscreate table users(id serial,name varchar(20));3、增加字段alter table users add column age int;4、修改字段类型alter table users alter col
2015-01-17 14:16:05 994
原创 【LeetCode】Second Highest Salary && Nth Highest Salary
1、Second Highest Salary Total Accepted: 1030 Total Submissions: 4309 My Submissions Question Solution Write a SQL query to get the second highest salary from the Employee table.+----+--------+|
2015-01-16 14:12:37 3421 6
时间转换工具
2014-01-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人