面试
Flyinocean
这个作者很懒,什么都没留下…
展开
-
博客第一篇:以后准备记录面试相关资料
先起个头,过后回来更新。在准备面试过程中一定会遇到很多算法和编程题目,记录下来,分享给大家。Java Tips:java为了提高效率,初始化了Integer类中 -128--127之间的整数对象,所以在赋值在这个范围内都是同一个对象。超出范围的非同一object,使用equals方法结果不同。String类的instance如果初始化为object,需要使用inte原创 2012-03-14 10:10:00 · 307 阅读 · 0 评论 -
面试题目积累
Java Final 关键字final用于成员变量时,只能被赋值一次,而且不能被修改(等同于c++的const)。可以只声明,不初始化。final方法不能被子类覆盖,(说明final方法肯定有效果),但是可以被继承)final类不能被继承,final类的方法默认都是final的。final类保证不会有子类,保证类内容不被修改。final方法保证不会被修改或者改变意义原创 2012-03-20 03:41:11 · 247 阅读 · 0 评论 -
Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, whe原创 2014-09-19 06:57:51 · 333 阅读 · 0 评论 -
Median of Two Sorted Array
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).原创 2014-09-19 07:12:47 · 327 阅读 · 0 评论 -
Leetcode练习-Add Two Number
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link原创 2014-08-16 11:16:49 · 360 阅读 · 0 评论