5-8Geometryimport mathdef sqcube(): s = float(raw_input('enter length of one side: ')) print 'the area is:', s ** 2., '(units squared)' print 'the ...
分类:
编程语言 时间:
2015-09-15 12:28:51
阅读次数:
141
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 longes...
分类:
其他好文 时间:
2015-09-15 12:23:54
阅读次数:
165
QuestionGiven an array of integers, every element appearstwiceexcept for one. Find that single one.Solution 1 -- SetWe can use a hash set to record ea...
分类:
其他好文 时间:
2015-09-15 06:58:25
阅读次数:
151
题意:按下列规则生成一组序列,令f(n)为n这个数在序列中出现的最后一个位置,求f(f(n))的值。1. First, write down 1, 2 on a paper.2. The 2nd number is 2, write down 2 2’s (including the one ori...
分类:
其他好文 时间:
2015-09-15 06:58:07
阅读次数:
183
单向OneToMany一个用户有多张照片,User----->Images是一对多关系,在数据库中Images维护一个外键useid1、在映射关系的主控方Image这边,我们什么都不做。(为什么说Images是主控方呢?因为外键又Images维护)2、在映射关系的被控方User这边,需要添加@One...
分类:
Web程序 时间:
2015-09-15 06:56:49
阅读次数:
165
QuestionGiven an array ofnpositive integers and a positive integers, find the minimal length of a subarray of which the sum ≥s. If there isn't one, re...
分类:
其他好文 时间:
2015-09-15 06:56:39
阅读次数:
122
1 题目Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.2 思路当时看到这个题目就想到的是归并排序。好吧,但是,具体代码写不出来。题目给的是数组:publi...
分类:
其他好文 时间:
2015-09-14 22:41:57
阅读次数:
207
需求:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest...
分类:
其他好文 时间:
2015-09-14 22:27:06
阅读次数:
156
1.控制器内部的view是延迟加载1> 用到时再加载2> 加载完毕后会调用控制器的viewDidLoad方法2.创建控制器的方式1> 直接通过代码创建OneViewController *one = [[OneViewController alloc] init];如果调用init方法创建控制器(T...
分类:
其他好文 时间:
2015-09-14 19:16:16
阅读次数:
144
Question:Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant di...
分类:
其他好文 时间:
2015-09-14 19:14:51
阅读次数:
132