【题目】
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For "bbbbb" the longest substring is "b", with the len...
分类:
其他好文 时间:
2014-05-15 14:40:14
阅读次数:
320
一、android几种定时器的机制及区别。
答:在android中,经常用到的定时器主要有以下几种实现:
1、采用handler与线程的sleep(long)方法
开启一个线程,,每隔1s向Handler发送消息
public class MainActivity extends Activity {
private Handler myhandler;
private static...
分类:
移动开发 时间:
2014-05-15 06:26:20
阅读次数:
440
最近面试遇到了一道面试题,顿时有点迷糊,只说出了思路,后来百度了一下,整理了一下思路,于是记录下来,方便以后学习。(面试题请参见附件)
相关的数据表:
1.Score表
2.[User]表
SQL语句如下:
--方法一:静态SQL
SELECT * FROM
(SELECT UID,Name, Score,ScoreName FROM Score,[User] WHERE S...
分类:
数据库 时间:
2014-05-15 05:46:12
阅读次数:
296
【题目】
原文:
1.6 Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do this in place?
译文:
一张图像表示...
分类:
其他好文 时间:
2014-05-15 05:43:35
阅读次数:
240
【题目】
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 linked list.
Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
Out...
分类:
其他好文 时间:
2014-05-15 05:13:49
阅读次数:
306
【题目】
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)
P A H N
A P L S I I G
Y I R
And then read line by line: "PAHNAPLSI...
分类:
其他好文 时间:
2014-05-15 04:30:57
阅读次数:
313
【题目】
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.
【题意】
题意是找出字符串S中最长回文子串,S最长为1000,保证有唯一解
【思路】
原字符串用特殊字符#间隔,如下所示:
#a...
分类:
其他好文 时间:
2014-05-15 03:31:25
阅读次数:
299
原文:
1.5 Write a method to replace all spaces in a string with ‘%20’.
译文:
写一个函数,把字符串中所有的空格替换为%20 。...
分类:
其他好文 时间:
2014-05-14 14:09:29
阅读次数:
310
说明:本文的内容是看了《深入理解Java虚拟机:JVM高级特性与最佳实践》后为加印象和理解,便记录了重要的内容。1
开门见山以前曾经看到过一个java的面试题,当时觉得此题很简单,可是自己把代码运行起来,可是结果并不是自己想象的那样。题目如下:class SingleTon
{ private st...
分类:
编程语言 时间:
2014-05-14 12:02:07
阅读次数:
456