- 博客(13)
- 收藏
- 关注
原创 44、 Wildcard Matching (Hard)
Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequence of characters (including the empty sequence). The matching should cov
2016-08-20 22:20:31
281
原创 212、Word Search II (Hard)
Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those hor
2016-08-20 22:11:21
429
原创 79、 Word Search (Medium)
Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically
2016-08-20 22:05:22
344
原创 149、Max Points on a Line (Hard)
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 题目就是在二维平面里给一堆点的x坐标和y坐标,求一条能穿过点的直线的上面的点的最大数目。 题意很明确,难点在于一是用何种数据结构解决,二是如何区分直线。因为每个直线有k和b两个属性,而两点共线
2016-08-20 21:50:23
280
原创 315、Count of Smaller Numbers After Self(Hard)
You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smaller elements to the right of nums[i]. Example
2016-08-20 21:44:34
298
原创 84、Largest Rectangle in Histogram(Hard)
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram. Above is a histogram where width o
2016-08-20 21:33:07
211
原创 1006 1007 Biorhythms DNA排序
第6题是中国余数定理的考察,只要了解中国余数定理不难。第7题是求逆序对个数并排序,注意重写compareTo方法以及用集合类解题的思路。
2016-04-19 21:53:46
365
原创 1003,1004,1005 Hangover,财务管理,I Think I Need a Houseboat
三道很简单的题目。代码分别如下所示: import java.util.*; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNext()){ float a=sc.nextFloat(); int numbe
2016-04-19 20:47:07
313
原创 1002:487-3249(电话号码转换)
Description Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the Universit
2016-04-11 09:21:23
482
原创 Double-Lock Checking
Double-Lock Checking,也就是所谓的“双锁检测”,是实现Java并发安全的一个重要手段。比如单例模式的双检锁,先看下面代码: class Foo { private Helper helper = null; public Helper getHelper() { if (helper == null) helper = new H
2016-04-10 09:36:08
1288
原创 Java8 Stream类学习笔记
今天看了一下午的Stream类,写点学习笔记,感觉还是理解不完全,应该还会有Stream类的后续笔记。 先贴一段采取Stream类实现的求一个String数组里所有质数的程序(请无视掉那个guava的com.google.common.collect.Lists的导入包): import java.util.List; import java.util.Arrays; import jav
2016-04-09 21:37:22
481
原创 1001:Exponentiation
Description Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many co
2016-04-09 21:27:29
474
原创 第一篇博客
以前就有写博客的想法,可惜因为懒而很久都没实施。最近在应聘过程中发现自己身上还有许多问题,而写博客感觉不失为一种解决问题的好办法,所以准备开始我的博客之路,希望能够长久坚持下去。 下面详细谈谈为何要写博客。先说说问题。主要问题有以下两点:1、简历内容不丰富。这个也没办法,自己大学学的是物联网专业,属于软件学院,但是由于我们是第一届,所以虽然学的和软件工程的课程差不多,但学费却异常便宜
2016-04-08 22:38:35
359
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人