• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
xiaoba1203
记录leetcode之路
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理
上一页 1 ··· 13 14 15 16 17 18 19 下一页

2016年8月25日

leetcode 58 Length of Last Word ----- java
摘要: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word 阅读全文
posted @ 2016-08-25 23:42 xiaoba1203 阅读(844) 评论(0) 推荐(0)
 
leetcode 57 Insert Interval ----- java
摘要: Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initia 阅读全文
posted @ 2016-08-25 23:24 xiaoba1203 阅读(304) 评论(0) 推荐(0)
 
 

2016年8月11日

leetcode 56 Merge Intervals ----- java
摘要: Given a collection of intervals, merge all overlapping intervals. For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18]. 这道题就是合并所有集 阅读全文
posted @ 2016-08-11 21:33 xiaoba1203 阅读(166) 评论(0) 推荐(0)
 
 

2016年8月8日

leetcode 55 Jump Game ----- java
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Given an array of non-negative integers, you ar 阅读全文
posted @ 2016-08-08 21:25 xiaoba1203 阅读(196) 评论(0) 推荐(0)
 
使用NTP获取网络时间-----java
摘要: 在做系统对时的时候,需要使用到ntp来获取时间。 可以使用common-net包来获取ntp服务器的时间(即可以向那些标准时间服务器对时,也可以向自己设置好的ntp服务器进行对时)。 使用java获取ntp的时间(t1,t2,t3,t4)。下面是官网上给出的关于使用common-net关于ntp部分 阅读全文
posted @ 2016-08-08 20:12 xiaoba1203 阅读(7266) 评论(0) 推荐(0)
 
leetcode 54 Spiral Matrix ----- java
摘要: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example,Given the following matrix: You s 阅读全文
posted @ 2016-08-08 20:03 xiaoba1203 阅读(226) 评论(0) 推荐(0)
 
 

2016年7月29日

leetcode 53 Maximum Subarray ----- java
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [−2,1,−3,4,−1,2, 阅读全文
posted @ 2016-07-29 17:57 xiaoba1203 阅读(186) 评论(0) 推荐(0)
 
 

2016年7月28日

leetcode 51 N-Queens & 52 N-Queens II ----- java
摘要: The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all 阅读全文
posted @ 2016-07-28 20:47 xiaoba1203 阅读(266) 评论(0) 推荐(0)
 
leetcode 50 Pow(x, n) ---- java
摘要: Implement pow(x, n). 题目简单明了,就是求一个数的n次方。 注意两个问题即可:1、最小的int的绝对值要比最大的int大1,因此在转换的时候需要额外多乘一次x 2、在n比较大的情况下,直接将x乘n次会导致结果不准确,因为每一次结果只保留最后有限的数位,那么就要经可能的减少误差。 阅读全文
posted @ 2016-07-28 17:08 xiaoba1203 阅读(167) 评论(0) 推荐(0)
 
 

2016年7月27日

leetcode 49 Group Anagrams ---- java
摘要: Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: Note: All inputs will be i 阅读全文
posted @ 2016-07-27 16:14 xiaoba1203 阅读(404) 评论(0) 推荐(0)
 
 
上一页 1 ··· 13 14 15 16 17 18 19 下一页

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3