上一页 1 2 3 4 5 6 ··· 19 下一页
摘要: Given an integer, write a function to determine if it is a power of three. Follow up:Could you do it without using any loop / recursion? 阅读全文
posted @ 2016-11-22 11:16 破玉 阅读(229) 评论(0) 推荐(0)
摘要: Reverse a singly linked list. 阅读全文
posted @ 2016-11-21 10:51 破玉 阅读(113) 评论(0) 推荐(0)
摘要: Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. 此题是求阶乘后面零的个数。 阅读全文
posted @ 2016-11-20 09:04 破玉 阅读(155) 评论(0) 推荐(0)
摘要: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 - 阅读全文
posted @ 2016-11-19 11:22 破玉 阅读(151) 评论(0) 推荐(0)
摘要: 在处理一道题目是,发现他们使用了List 中的set 方法,这个方法我平时很少用到,今天来研究一下,set和add的区别 add(int index,Object obj)方法与set(int index,Object e) 我们写一个例子: 结果: 阅读全文
posted @ 2016-11-18 11:47 破玉 阅读(5790) 评论(0) 推荐(1)
摘要: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the 阅读全文
posted @ 2016-11-18 11:10 破玉 阅读(301) 评论(0) 推荐(0)
摘要: Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? 参考博客:链表环状检测 阅读全文
posted @ 2016-11-17 19:59 破玉 阅读(116) 评论(0) 推荐(0)
摘要: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3,3,1]. Note:Could you optimize your algorithm to us 阅读全文
posted @ 2016-11-16 10:02 破玉 阅读(159) 评论(0) 推荐(0)
摘要: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return solution: 阅读全文
posted @ 2016-11-14 10:25 破玉 阅读(393) 评论(0) 推荐(0)
摘要: 近期在登录自己博客时,老是报数据库连接失败,然后重启服务器就好了。但是,重启服务器很耗时间,不方便,不能每次都重启吧于是远程连接服务器看了一下原来是数据库服务挂掉了启动时还报错于是查看了下错误日志 原因是内存不够用了,导致mysql 崩溃解决办法修改mysql配置文件 修改如下代码: 把内存改小就好 阅读全文
posted @ 2016-11-09 10:03 破玉 阅读(1008) 评论(0) 推荐(1)
上一页 1 2 3 4 5 6 ··· 19 下一页