OC中的语法糖常用现象总结@#nsnumbers NSNumber@{}dictionaries NSDictionary@“”strings NSString@[]arrays NSArray@()expressions 表达式:将()中的内容转换成对象类型
分类:
其他好文 时间:
2015-05-19 20:37:58
阅读次数:
127
There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should...
分类:
其他好文 时间:
2015-05-19 18:56:06
阅读次数:
91
package cn.itcast.demo;import java.sql.SQLException;import java.util.Arrays;import java.util.List;import java.util.Map;import org.apache.commons.dbuti...
分类:
数据库 时间:
2015-05-19 16:19:19
阅读次数:
163
1.将数字转换为字符串
2.对字符串数组进行升序排序
3.具体的排序规则为将两个字符串以str1+str2和str2+str1的方式拼接起来,然后比较两个拼接后的字符串即可
4.将排好序的字符串数组拼接起来即为要求的最大整数字符串
ps:刚开始走了好多弯路以比较短的字符串为基准和比较长的字符串循环比较,直至有不同大小的段为止,吃力不讨好,最后也没有算对^-^!...
分类:
其他好文 时间:
2015-05-19 10:37:34
阅读次数:
91
There are two sorted arrays nums1 and nums2 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)).问题分析首先...
分类:
其他好文 时间:
2015-05-18 23:04:00
阅读次数:
156
对以下代码进行编译:int main(){ int a[] = {1,2,3}; return 0;}$ gcc -g arrays.c -o arrays$ gdb arrays(gdb) break main(gdb) run(gdb) next1)可以使用 print 显示内容, ...
分类:
数据库 时间:
2015-05-18 10:28:51
阅读次数:
274
题意:就是求最小生成树的边权值和prim算法求最小生成树 1 import java.util.Scanner; 2 import java.util.Arrays; 3 /* 4 prim 5 */ 6 public class Main{ 7 static int map[][]; ...
分类:
其他好文 时间:
2015-05-18 01:04:00
阅读次数:
220
如下:package 集合类.Set类; import java.util.Arrays; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Set; /** * LinkedHas...
分类:
编程语言 时间:
2015-05-17 23:17:13
阅读次数:
166
Merge Sorted Array
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
Note:
You may assume that nums1 has enough space (size that is greater or equal...
分类:
其他好文 时间:
2015-05-17 18:44:52
阅读次数:
100
题意:股票经纪人要在人群中传播谣言,给出有联系的两个人及谣言在他们之间传播的时间,让你求出谣言从某个人开始传播至所有人所需的最短时间,以及这个人是第几个人folyd算法java代码 1 import java.util.Scanner; 2 import java.util.Arrays; 3 4....
分类:
其他好文 时间:
2015-05-17 18:24:48
阅读次数:
106