• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

nunca

但行好事 莫问前程
  • 博客园
  • 联系
  • 订阅
  • 管理

公告

随笔分类 -  LeetCode

1 2 3 下一页

LeetCode Hard: 23. Merge k Sorted Lists
摘要:一、题目 Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1->4->5, 1->3->4, 2->6 ] Out 阅读全文

posted @ 2018-05-11 08:10 乐晓东随笔 阅读(186) 评论(0) 推荐(0)

LeetCode Hard: 4. Median of Two Sorted Arrays
摘要:一、题目 There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexi 阅读全文

posted @ 2018-05-10 08:45 乐晓东随笔 阅读(184) 评论(0) 推荐(0)

LeetCode Medium: 49. Group Anagrams
摘要:一、题目 Given an array of strings, group anagrams together. Example: Input: ["eat", "tea", "tan", "ate", "nat", "bat"], Output: [ ["ate","eat","tea"], [" 阅读全文

posted @ 2018-05-09 07:50 乐晓东随笔 阅读(155) 评论(0) 推荐(0)

LeetCode Easy: 48. Rotate Image
摘要:一、题目 You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the image in-place, 阅读全文

posted @ 2018-05-08 07:52 乐晓东随笔 阅读(191) 评论(0) 推荐(0)

LeetCode Medium: 43. Multiply Strings
摘要:这道题不解释,纯粹是为了延续记录。两行代码。 一、题目 Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represente 阅读全文

posted @ 2018-05-05 01:14 乐晓东随笔 阅读(124) 评论(0) 推荐(0)

LeetCode Medium: 40. Combination Sum II
摘要:一、题目 Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate 阅读全文

posted @ 2018-05-04 08:16 乐晓东随笔 阅读(123) 评论(0) 推荐(0)

LeetCode Medium: 39. Combination Sum
摘要:一、题目 Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where 阅读全文

posted @ 2018-05-03 15:49 乐晓东随笔 阅读(234) 评论(0) 推荐(0)

LeetCode Medium: 36. Valid Sudoku
摘要:一、题目 Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: Each row must contain the  阅读全文

posted @ 2018-05-02 21:08 乐晓东随笔 阅读(202) 评论(0) 推荐(0)

LeetCode Medium: 34. Search for a Range
摘要:一、题目 Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtim 阅读全文

posted @ 2018-05-01 09:48 乐晓东随笔 阅读(151) 评论(0) 推荐(0)

LeetCode Easy: 33. Search in Rotated Sorted Array
摘要:一、题目 Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2 阅读全文

posted @ 2018-04-30 10:58 乐晓东随笔 阅读(164) 评论(0) 推荐(0)

LeetCode Medium: 31. Next Permutation
摘要:一、题目 Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not p 阅读全文

posted @ 2018-04-29 10:00 乐晓东随笔 阅读(129) 评论(0) 推荐(0)

LeetCode Medium: 29. Divide Two Integers
摘要:一、题目 Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Return the quotient after d 阅读全文

posted @ 2018-04-28 16:51 乐晓东随笔 阅读(167) 评论(0) 推荐(0)

LeetCode Medium:24. Swap Nodes in Pairs
摘要:一、题目 Given a linked list, swap every two adjacent nodes and return its head. Example: Note: Your algorithm should use only constant extra space. You m 阅读全文

posted @ 2018-04-22 13:01 乐晓东随笔 阅读(165) 评论(0) 推荐(0)

LeetCode Medium:22. Generate Parentheses
摘要:一、题目 Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set 阅读全文

posted @ 2018-04-21 19:55 乐晓东随笔 阅读(159) 评论(0) 推荐(0)

LeetCode Medium: 19. Remove Nth Node From End of List
摘要:一、题目 Given a linked list, remove the n-th node from the end of list and return its head. Example: Note: Given n will always be valid. 给定一个链接的 list,移除从 阅读全文

posted @ 2018-04-19 11:12 乐晓东随笔 阅读(149) 评论(0) 推荐(0)

LeetCode Medium: 18. 4Sum
摘要:一、题目 Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all uni 阅读全文

posted @ 2018-04-17 11:12 乐晓东随笔 阅读(222) 评论(0) 推荐(0)

LeetCode Medium: 16. 3Sum Closest
摘要:一、题目 Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of th 阅读全文

posted @ 2018-04-16 23:44 乐晓东随笔 阅读(126) 评论(0) 推荐(0)

LeetCode Medium: 17. Letter Combinations of a Phone Number
摘要:一、题目 Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit 阅读全文

posted @ 2018-04-14 08:49 乐晓东随笔 阅读(176) 评论(0) 推荐(0)

LeetCode Medium:15. 3Sum
摘要:一、题目 Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives 阅读全文

posted @ 2018-04-13 09:28 乐晓东随笔 阅读(140) 评论(0) 推荐(0)

LeetCode Medium:12. Integer to Roman
摘要:一、题目 Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 把给定的整数转换成罗马数字 二、思路 这道题其实跟13题是两个相反的过程, 阅读全文

posted @ 2018-04-12 11:48 乐晓东随笔 阅读(130) 评论(0) 推荐(0)

1 2 3 下一页
 
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3