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

随笔分类 -  leetcode

上一页 1 ··· 3 4 5 6 7 8 9 下一页

leetcode 历程
 
leetcode 89 Gray Code ----- java
摘要:The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total num 阅读全文
posted @ 2016-10-19 22:06 xiaoba1203 阅读(290) 评论(0) 推荐(0)
leetcode 88 Merge Sorted Array ----- java
摘要:Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:You may assume that nums1 has enough space (size tha 阅读全文
posted @ 2016-10-19 22:04 xiaoba1203 阅读(140) 评论(0) 推荐(0)
leetcode 87 Scramble String ----- java
摘要:Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representati 阅读全文
posted @ 2016-10-19 22:03 xiaoba1203 阅读(274) 评论(0) 推荐(0)
leetcode 85 Maximal Rectangle ----- java
摘要:Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. For example, given the following 阅读全文
posted @ 2016-10-19 11:46 xiaoba1203 阅读(398) 评论(0) 推荐(0)
leetcode 86 Partition List ----- java
摘要:Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the 阅读全文
posted @ 2016-10-19 11:15 xiaoba1203 阅读(150) 评论(0) 推荐(0)
leetcode 84 Largest Rectangle in Histogram ----- java
摘要:Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist 阅读全文
posted @ 2016-10-18 23:17 xiaoba1203 阅读(139) 评论(0) 推荐(0)
leetcode 83 Remove Duplicates from Sorted List ----- java
摘要:Given a sorted linked list, delete all duplicates such that each element appear only once. For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, 阅读全文
posted @ 2016-10-18 19:06 xiaoba1203 阅读(128) 评论(0) 推荐(0)
leetcode 82 Remove Duplicates from Sorted List II ----- java
摘要:Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example,Given 1->2 阅读全文
posted @ 2016-10-18 18:55 xiaoba1203 阅读(136) 评论(0) 推荐(0)
leetcode 81 Search in Rotated Sorted Array II ----- java
摘要:Follow up for "Search in Rotated Sorted Array": Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the 阅读全文
posted @ 2016-10-18 18:15 xiaoba1203 阅读(215) 评论(0) 推荐(0)
leetcode 80 Remove Duplicates from Sorted Array II ----- java
摘要:Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array nums = [1,1,1,2,2,3], Your function sho 阅读全文
posted @ 2016-10-16 18:02 xiaoba1203 阅读(226) 评论(0) 推荐(0)
leetcode 79 Word Search ----- java
摘要:Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac 阅读全文
posted @ 2016-10-16 17:40 xiaoba1203 阅读(687) 评论(0) 推荐(0)
leetcode 78 Subsets ----- java
摘要:Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. For example,If nums =  阅读全文
posted @ 2016-10-16 16:32 xiaoba1203 阅读(225) 评论(0) 推荐(0)
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 阅读(281) 评论(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)
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 阅读(569) 评论(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)
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)
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)
 

上一页 1 ··· 3 4 5 6 7 8 9 下一页

公告


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