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

2016年10月16日

leetcode 77 Combinations ----- java
摘要: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For example,If n = 4 and k = 2, a solution is: 求C(k,n)的所有结果。 阅读全文
posted @ 2016-10-16 16:20 xiaoba1203 阅读(279) 评论(0) 推荐(0)
 
leetcode 76 Minimum Window Substring ----- java
摘要: Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example,S = "ADOBECOD 阅读全文
posted @ 2016-10-16 13:57 xiaoba1203 阅读(235) 评论(0) 推荐(0)
 
 

2016年10月15日

leetcode 75 Sort Colors ----- java
摘要: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, 阅读全文
posted @ 2016-10-15 23:30 xiaoba1203 阅读(159) 评论(0) 推荐(0)
 
leetcode 74 Search a 2D Matrix ----- java
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted f 阅读全文
posted @ 2016-10-15 21:55 xiaoba1203 阅读(227) 评论(0) 推荐(0)
 
leetcode 73 Set Matrix Zeroes ----- java
摘要: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. click to show follow up. Follow up: Did you use extra sp 阅读全文
posted @ 2016-10-15 18:32 xiaoba1203 阅读(568) 评论(0) 推荐(0)
 
leetcode 72 Edit Distance ----- java
摘要: Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have 阅读全文
posted @ 2016-10-15 16:47 xiaoba1203 阅读(177) 评论(0) 推荐(0)
 
 

2016年10月14日

leetcode 71 Simplify Path ------ java
摘要: Given an absolute path for a file (Unix-style), simplify it. For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c" click to show co 阅读全文
posted @ 2016-10-14 01:26 xiaoba1203 阅读(246) 评论(0) 推荐(0)
 
 

2016年10月12日

leetcode 70 Climbing Stairs ----- java
摘要: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl 阅读全文
posted @ 2016-10-12 22:37 xiaoba1203 阅读(180) 评论(0) 推荐(0)
 
leetcode 69 Sqrt(x) ---java
摘要: Implement int sqrt(int x). Compute and return the square root of x. 求一个数的平方根。 其实就是一个二分查找。 有两种查找方式 1、就是找到最大int值,然后从0到max,二分查找。 2、直接针对x,从0到x,二分查找。 阅读全文
posted @ 2016-10-12 22:10 xiaoba1203 阅读(232) 评论(0) 推荐(0)
 
leetcode 68 Text Justification ----- java
摘要: Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You shou 阅读全文
posted @ 2016-10-12 00:02 xiaoba1203 阅读(175) 评论(0) 推荐(0)
 
 
上一页 1 ··· 11 12 13 14 15 16 17 18 19 下一页

公告


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