- 博客(20)
- 资源 (11)
- 收藏
- 关注
原创 [LeetCode] Intersection of Two Arrays II
Given two arrays, write a function to compute their intersection.Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].Note:Each element in the result should appear as many times as it s
2016-05-21 15:04:57 4497
原创 [LeetCode] Intersection of Two Arrays
Given two arrays, write a function to compute their intersection.Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].Note:Each element in the result must be unique.The result can be in a
2016-05-19 10:43:59 1271
原创 [LeetCode] Self Crossing
You are given an array x of n positive numbers. You start at point (0,0) and moves x[0] metres to the north, then x[1] metres to the west, x[2] metres to the south, x[3] metres to the east and so on. I
2016-05-16 21:47:19 4140
原创 [LeetCode] Palindrome Pairs
Given a list of unique words. Find all pairs of distinct indices (i, j) in the given list, so that the concatenation of the two words, i.e. words[i] + words[j] is a palindrome.Example 1: Given words =
2016-05-16 13:57:00 2948
原创 [LeetCode] Counting Bits
Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and return them as an array.Example: For num = 5 you sh
2016-05-16 11:21:20 3886
原创 [LeetCode] Flatten Nested List Iterator
Given a nested list of integers, implement an iterator to flatten it.Each element is either an integer, or a list – whose elements may also be integers or other lists.Example 1: Given the list [[1,1],
2016-05-16 10:54:59 4141
原创 [LeetCode] Power of Four
Given an integer (signed 32 bits), write a function to check whether it is a power of 4.Example: Given num = 16, return true. Given num = 5, return false.Follow up: Could you solve it without loops/re
2016-05-16 10:22:03 3448
原创 [LeetCode] Integer Break
Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.For example, given n = 2, return 1
2016-05-15 22:09:00 3858
原创 [LeetCode] Reverse Vowels of a String
Write a function that takes a string as input and reverse only the vowels of a string.Example 1: Given s = “hello”, return “holle”.Example 2: Given s = “leetcode”, return “leotcede”.解题思路双指针,一个往前移动,一个
2016-05-15 11:30:43 3983
原创 [LeetCode] Top K Frequent Elements
Given a non-empty array of integers, return the k most frequent elements.For example, Given [1,1,1,2,2,3] and k = 2, return [1,2].Note: You may assume k is always valid, 1 ≤ k ≤ number of unique elem
2016-05-15 10:59:59 4043
原创 69道Spring面试题和答案
链接:http://ifeve.com/spring-interview-questions-and-answers/ 原文:http://www.javacodegeeks.com/2014/05/spring-interview-questions-and-answers.html%20什么是spring?Spring 是个Java企业级应用的开源开发框架。Spring主要用来开发Java
2016-05-14 17:20:08 3400
原创 Java Web前端到后台常用框架介绍
转自: http://blog.csdn.net/u013142781/article/details/50922010一、SpringMVChttp://blog.csdn.net/evankaka/article/details/45501811 Spring Web MVC是一种基于Java的实现了Web MVC设计模式的请求驱动类型的轻量级Web框架,即使用了MVC架构模式的思想,将web
2016-05-14 17:17:11 5117
原创 Java多线程和并发基础面试问答
链接:http://ifeve.com/java-multi-threading-concurrency-interview-questions-with-answers/ 原文:http://www.journaldev.com/1162/java-multi-threading-concurrency-interview-questions-with-answers多线程和并发问题是Java技
2016-05-14 16:56:55 4128
原创 Spring-EhCache配置实例
使用配置Maven依赖 <!--ehcache--> <dependency> <groupId>com.googlecode.ehcache-spring-annotations</groupId> <artifactId>ehcache-spring-annotations</artifactId> <type>jar</type> <version>1
2016-05-14 16:43:42 5372
原创 数据库记录模拟器——DataEmulator
Introduction该工具可以根据数据库表的描述文件模拟数据库表记录Get Started1 编写描述文件使用时仅需编写一个数据库表的描述文件,即可生成相应行数的数据库表记录。数据库表描述文件的格式如下:table:tablename1 rowsfieldname1 fieldtype1 [min,max)|{val1,...,valn} pk...fieldnamen fieldtype
2016-05-13 15:13:09 5753 3
原创 日志组件logback介绍及配置使用方法
转载于:http://sunney2010.iteye.com/blog/1404729一、logback的介绍Logback是由log4j创始人设计的又一个开源日志组件。logback当前分成三个模块:logback-core,logback- classic和logback-access。logback-core是其它两个模块的基础模块。logback-classic是log4j的一个 改良版本
2016-05-13 10:20:09 2291
原创 日志组件slf4j介绍及配置详解
基本介绍每一个Java程序员都知道日志对于任何一个Java应用程序,尤其是服务端程序是至关重要的,而很多程序员也已经熟悉各种不同的日志库如java.util.logging、Apache log4j、logback。但如果你还不知道SLF4J(Simple logging facade for Java)的话,那么是时候去在你项目中学习使用SLF4J了。SLF4J不同于其他日志类库,与其它日志类库有
2016-05-12 17:24:46 151882 23
原创 chmod命令详解
使用方式 chmod [-cfvR] [–help] [–version] mode file… 只能文件属主或特权用户才能使用该功能来改变文件存取模式。mode可以是数字形式或以who opcode permission形式表示。who是可选的,默认是a(所有用户)。只能选择一个opcode(操作码)。可指定多个mode,以逗号分开。说明Linux/Unix 的档案调用权限分为三级 : 档案
2016-05-11 17:24:13 1096
原创 Maven常用命令
常用命令编译源代码: mvn compile 编译测试代码:mvn test-compile 运行测试:mvn test 产生site:mvn site 打包:mvn package 在本地Repository中安装jar:mvn install 清除产生的项目:mvn clean 生成eclipse项目:mvn eclipse:eclipse 生成idea
2016-05-11 16:11:24 2456
原创 我们究竟什么时候可以使用Ehcache缓存
文/小程故事多(简书作者) 原文链接:http://www.jianshu.com/p/2cd6ad416a5a一、Ehcache是什么EhCache是Hibernate的二级缓存技术之一,可以把查询出来的数据存储在内存或者磁盘,节省下次同样查询语句再次查询数据库,大幅减轻数据库压力。二、Ehcache的使用场景是什么1、首先最主要就是页面缓存。 网站页面的数据来源非常广泛的,大多数来自不同的对
2016-05-10 20:49:06 2534
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人