Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. Note: Each elemen ...
分类:
其他好文 时间:
2016-09-25 06:14:52
阅读次数:
134
Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you ...
分类:
其他好文 时间:
2016-09-25 06:11:16
阅读次数:
117
Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Note: Each element i ...
分类:
其他好文 时间:
2016-09-25 06:09:04
阅读次数:
107
设计模式---------------简单工厂模式一、题目(Question)使用简单工厂模式设计一个可以创建不同几何形状(如圆形、方形和三角形等)的绘图工具,每个几何图形都要有绘制draw()和擦除erase()两个方法,要求在绘制不支持的几何图形时,提示一个UnsupportedException异常。二、..
分类:
其他好文 时间:
2016-09-24 22:09:06
阅读次数:
468
/**进入系统首页*/ @RequestMapping("/index.do") publicStringindex(HttpServletResponseresponse) { Cookiecookie=newCookie("jsessionid","2jcligmgi6fh"); cookie.setMaxAge(Integer.MAX_VALUE); response.addCookie(cookie); return"main"; }
分类:
编程语言 时间:
2016-09-24 22:01:36
阅读次数:
255
/**进入系统首页*/@RequestMapping("/index.do")publicStringindex(HttpServletResponseresponse){Cookiecookie=newCookie("jsessionid","2jcligmgi6fh");cookie.setMaxAge(Integer.MAX_VALUE);response.addCookie(cookie);return"main";}
分类:
编程语言 时间:
2016-09-24 22:00:00
阅读次数:
154
package com.sinoservices.dms.orderinfo.entity; public class OrderDetailKeyCondition { //工单主键 private Long id; public Long getId() { return id; } publi ...
分类:
其他好文 时间:
2016-09-24 21:50:14
阅读次数:
164
经典继承封装函数o1.__proto__ O.prototype o2构造函数的实例的__proto__和构造函数的prototype是全等于的function craeate(obj){ function F(){}; F.prototype=obj; return new F();} ES5(I ...
分类:
其他好文 时间:
2016-09-24 17:45:28
阅读次数:
166
暴力搜索: public class Solution { public int search(int idx, int[] nums){ if(idx<0){ return 0; } return Math.max(nums[idx] + search(idx-2, nums), search(i ...
分类:
其他好文 时间:
2016-09-24 17:25:12
阅读次数:
148
function quickSort(arr){ if(arr.length<=1){ return arr; } var num = Math.floor(arr.length/2); var numValue = arr.splice(num,1); var left... ...
分类:
编程语言 时间:
2016-09-24 16:17:58
阅读次数:
221