原题链接在这里:https://leetcode.com/problems/product-of-array-except-self/看到这道题内心十分憎恨自己,这道题在Amazon电面中遇到,当时没有刷题,没有想到这种方法,若是当时刷了题该多好。leftArr rightArr的方法早已知晓。fo...
分类:
其他好文 时间:
2015-10-15 06:23:50
阅读次数:
228
原文:javascript函数值的重写javascript函数值的重写 定义了一个函数,需要重写这个函数并使用原先的函数值。做法是: 1.定义一个变量让原先函数的值指向它,把原先函数的指向一个新的函数值,在这个函数值中执行原先的函数值。 function foo(){ console.log("fo...
分类:
编程语言 时间:
2015-10-13 18:40:01
阅读次数:
186
如果不小心把错误的commit给commit了,可以对其进行撤销1.使用git log查看commit日志,找到错误提交前一版本commit的哈希值;2.使用git reset --hard commit_id;3.git push origin HEAD --force(git push --fo...
分类:
其他好文 时间:
2015-10-12 12:07:20
阅读次数:
129
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 fo...
分类:
其他好文 时间:
2015-10-12 08:08:22
阅读次数:
217
publicvoidconvertMapToDataEntity(Mapmap)throwsSystemException{Field[]fields=super.getClass().getDeclaredFields();StringstrValue=null;FieldcurrField=null;StringcurrFieldName=null;StringcurrFieldTypeName=null;StringmethodName=null;MethodcurrMethod=null;try{fo..
分类:
其他好文 时间:
2015-10-09 15:26:05
阅读次数:
120
ObjFunction.py 1 import math 2 3 4 def GrieFunc(vardim, x, bound): 5 """ 6 Griewangk function 7 """ 8 s1 = 0. 9 s2 = 1.10 fo...
分类:
编程语言 时间:
2015-10-06 23:34:38
阅读次数:
940
在HT for Web中2D和3D应用都支持树状结构数据的展示,展现效果各异,2D上的树状结构在展现层级关系明显,但是如果数据量大的话,看起来就没那么直观,找到指定的节点比较困难,而3D上的树状结构在展现上配合HT fo...
分类:
Web程序 时间:
2015-10-06 15:33:32
阅读次数:
273
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:
其他好文 时间:
2015-10-04 11:02:20
阅读次数:
115
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-10-04 00:21:09
阅读次数:
211
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 fo...
分类:
其他好文 时间:
2015-10-02 23:43:21
阅读次数:
297