上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 41 下一页
摘要: Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? 题意: 判断一个链表是否有环。 解决方案: 双指针,快指针每次走两步,慢指针每次 阅读全文
posted @ 2016-07-22 14:53 冰凌花花~ 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library functio 阅读全文
posted @ 2016-07-22 14:20 冰凌花花~ 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another e 阅读全文
posted @ 2016-07-22 11:18 冰凌花花~ 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 视频讲解 http://v.youku.com/v_show/id_XMTY1MTMzNjAyNA==.html (1)定义两个指针 ListNode fast = head; ListNode slow = head; (2)将快指针向前移动N步 (3.1)判断此时快指针是否已经到达尽头,如果是, 阅读全文
posted @ 2016-07-20 20:26 冰凌花花~ 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 视频讲解 http://v.youku.com/v_show/id_XMTY1MTAyODM3Ng==.html int 范围: overflow: 当被除数为 Integer.MIN_VALUE的时候,取绝对值或者除以-1都会造成溢出overflow. (1)把两个数转化成long类型,可以得到正 阅读全文
posted @ 2016-07-20 00:28 冰凌花花~ 阅读(121) 评论(0) 推荐(0) 编辑
摘要: /* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Ideone {... 阅读全文
posted @ 2016-06-23 14:52 冰凌花花~ 阅读(213) 评论(0) 推荐(0) 编辑
摘要: import java.io.*; import java.lang.reflect.Array; import java.util.Arrays; import java.util.Collection; class test { public static void main (String[] args) throws java.lang.Exception { ... 阅读全文
posted @ 2016-06-19 22:53 冰凌花花~ 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Numeric Inputs Numbers are even easier to validate than text. For number input types, the HTML5 spec gives youattributes like min, max, and step. Each 阅读全文
posted @ 2016-06-09 17:44 冰凌花花~ 阅读(169) 评论(0) 推荐(0) 编辑
摘要: http://guides.rubyonrails.org/v3.0.8/active_record_validations_callbacks.html#on 在特定的action里使用validates The :on option lets you specify when the valid 阅读全文
posted @ 2016-06-02 18:35 冰凌花花~ 阅读(123) 评论(0) 推荐(0) 编辑
摘要: pry(main)> puts "showlastupdate:{\"$gte\":\"#{Date.today.to_s(:number)}\"}"showlastupdate:{"$gte":"20160601"} 阅读全文
posted @ 2016-06-01 11:17 冰凌花花~ 阅读(274) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 41 下一页