TilingTime Limit: 1000MSMemory Limit:
65536KTotal Submissions: 7264Accepted: 3528DescriptionIn how many ways can you
tile a 2xn rectangle by 2x1 or 2x...
分类:
其他好文 时间:
2014-05-17 15:07:20
阅读次数:
245
You need to override onSaveInstanceState(Bundle
savedInstanceState) and write the application state values you want to change to
the Bundle parameter ...
分类:
移动开发 时间:
2014-05-17 14:49:13
阅读次数:
292
【题目】
原文:
1.8 Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is a rotation of s1 using only one...
分类:
其他好文 时间:
2014-05-16 01:50:08
阅读次数:
311
题目1:Best Time to Buy and Sell Stock
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction (ie,...
分类:
其他好文 时间:
2014-05-16 01:46:15
阅读次数:
460
【题目】
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a contain...
分类:
其他好文 时间:
2014-05-16 01:32:47
阅读次数:
406
Problem DescriptionA number sequence is defined
as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given
A, B, and n, you are t...
分类:
其他好文 时间:
2014-05-16 00:34:50
阅读次数:
354
[ 问题: ]
Hint:
Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.
Notes: It is intended for this...
分类:
其他好文 时间:
2014-05-15 23:34:05
阅读次数:
353
原题:
题目解析:这个问题的实质是要我们按成访问二叉树的结点,并返回每层访问的结果,这里要求走Z字,其实就是一行正向一行反向。
/*
the kernel idea is visit a binary search tree in level and
the additional work we have to label the end of one level.
*/
v...
分类:
其他好文 时间:
2014-05-15 23:18:46
阅读次数:
515
介绍ViewFlipper
ViewFlipper
Simple ViewAnimator that will animate between two or more views that have been added to it. Only one child is shown at a time. If requested, can automatically flip betwee...
分类:
其他好文 时间:
2014-05-15 18:37:44
阅读次数:
356
介绍EditText颤抖的动画效果
Animation1.java
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except...
分类:
其他好文 时间:
2014-05-15 18:12:00
阅读次数:
345