03 2017 档案

摘要:2017腾讯OMG实习生面试总结 一面 一面有两个面试官,轮着来的,一共是一个半小时,中间等了10分钟左右。结合简历问了问项目,也考察了基础,手写了两道简单的算法题。问题包括: 第一个面试官 1、自我介绍一下 2、问简历上的项目情况 3、看你之前做的都是Java项目,说说JVM的内存管理(把JVM内 阅读全文
posted @ 2017-03-21 17:43 puyangsky 阅读(1831) 评论(0) 推荐(0)
摘要:原题 You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the qualit 阅读全文
posted @ 2017-03-14 12:37 puyangsky 阅读(334) 评论(0) 推荐(0)
摘要:顺时针打印数组 题意 例如我们有一个二维数组,如下 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 现在要按照顺时针打印出来,结果应该为: 1 2 3 4 8 12 16 15 14 13 9 5 6 7 11 10 思路 设置四个下标,分别代表左上、右上、右下、左下的 阅读全文
posted @ 2017-03-11 17:47 puyangsky 阅读(331) 评论(0) 推荐(0)
摘要:数组中只出现一次的数字 题目描述 一个整型数组里除了两个数字之外,其他的数字都出现了两次。请写程序找出这两个只出现一次的数字。 思路 我们知道两个相同的数字异或的结果为0,所以如果只有一个出现一次的数字,就可以让所有的数字进行异或,那么最后得到的数字就是只出现一次的数字。 现在问题变成了有两个数字, 阅读全文
posted @ 2017-03-11 17:28 puyangsky 阅读(387) 评论(0) 推荐(0)
摘要:原题 Write a program to find the n th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 阅读全文
posted @ 2017-03-09 11:33 puyangsky 阅读(642) 评论(0) 推荐(0)
摘要:单例模式的几种写法 1、懒汉式,非线程安全 private修饰构造方法使得从外部无法直接创建实例(反射除外),但是没有考虑多线程环境。 public class Singleton { //懒汉式 非线程安全 private static Singleton instance; private Si 阅读全文
posted @ 2017-03-04 18:05 puyangsky 阅读(224) 评论(0) 推荐(0)
摘要:Java线程池学习 众所周知,Java不仅提供了线程,也提供了线程池库给我们使用,那么今天来学学线程池的具体使用以及线程池基本实现原理分析。 ThreadPoolExecutor ThreadPoolExecutor的构造方法: public ThreadPoolExecutor(int coreP 阅读全文
posted @ 2017-03-04 16:10 puyangsky 阅读(1418) 评论(0) 推荐(0)