自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 [leetcode]59. Spiral Matrix II

Given a positive integern, generate a square matrix filled with elements from 1 ton2in spiral order. Example: Input: 3 Output: [ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7, 6, 5 ] ] 这一题我就用了一个很笨的方法。。em...

2019-04-20 16:41:07 121

原创 [leetcode] 34. Find First and Last Position of Element in Sorted Array

Given an array of integersnumssorted in ascending order, find the starting and ending position of a giventargetvalue. Your algorithm's runtime complexity must be in the order ofO(logn). If the...

2019-03-15 22:29:54 107

原创 [leetcode]38. Count and Say

38.Count and Say Easy 6804923FavoriteShare The count-and-say sequence is the sequence of integers with the first five terms as following: 1. 1 2. 11 3. 21 4. 1211 5. 111221 ...

2019-03-07 19:40:19 115

原创 [leetcode]74. Search a 2D Matrix

Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties: Integers in each row are sorted from left to right. The first integer of each row...

2019-03-04 21:05:07 105

原创 [leetcode]29. Divide Two Integers

开学了。。最近一是懒了。。二是事情多。。。上了刷了一下leetcode。。 29.Divide Two Integers Given two integersdividendanddivisor, divide two integers without using multiplication, division and mod operator. Return the quotie...

2018-09-17 22:30:18 127

原创 [leetcode]48. Rotate Image

48.Rotate Image You are given annxn2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note: You have to rotate the imagein-place, which means you have to modify the...

2018-08-13 15:00:17 107

原创 [leetcode]8. String to Integer (atoi)

8.String to Integer (atoi) Implementatoiwhichconverts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-whitespace character i...

2018-07-25 21:57:28 240

原创 [leetcode]28. Implement strStr()

这几天在学如何搭虚拟机。。用Hadoop,还有重新补了一下java的知识 就做了几题相对简单的题目,leetcode也是easy的题目 28.Implement strStr() ImplementstrStr(). Return the index of the first occurrence of needle in haystack, or-1if needle is...

2018-07-25 20:50:26 175

原创 [leetcode]17. Letter Combinations of a Phone Number

17.Letter Combinations of a Phone Number Given a string containing digits from2-9inclusive, return all possible letter combinations that the number could represent. A mapping of digit to letters ...

2018-07-20 14:46:37 242

原创 [leetcode]41. First Missing Positive

emm今天刷了好几题。。有一题是合并两个已经排序好的链表的,由于我已经写过了合并多个已排序好链表的算法。。这里就不贴了。。这次题目如下: 41.First Missing Positive Given an unsorted integer array, find the smallest missingpositive integer. Example 1: Input: [1,2...

2018-07-19 21:52:28 101

原创 [leetcode]23. Merge k Sorted Lists

23.Merge k Sorted Lists Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1->4->5, 1->3->4, 2->6 ] Output: ...

2018-07-19 15:48:44 125

原创 [leetcode]9. Palindrome Number

由于准备要开组会。。研究没啥进展,慌得一笔,开会前找了题简单的练练手。。 Determine whether an integer is a palindrome. An integerisapalindrome when itreads the same backward as forward. Example 1: Input: 121 Output: true Examp...

2018-07-18 19:23:23 232

原创 [leetcode]2. Add Two Numbers

2.Add Two Numbers You are given twonon-emptylinked lists representing two non-negative integers. The digits are stored inreverse orderand each of their nodes contain a single digit. Add the two ...

2018-07-17 10:11:04 215

原创 [leetcode]13. Roman to Integer

Roman numerals are represented by seven different symbols:I,V,X,L,C,DandM. Symbol Value I 1 V 5 X 10 L 50 C 100 D ...

2018-07-15 14:49:45 243

原创 [leetcode]12. Integer to Roman

12.Integer to Roman Roman numerals are represented by seven different symbols:I,V,X,L,C,DandM. Symbol Value I 1 V 5 X 10 L 50 C ...

2018-07-15 11:26:46 103

原创 [leetcode]5. Longest Palindromic Substring

最近研究没什么进展。。无聊去刷刷leetcode Given a strings, find the longest palindromic substring ins. You may assume that the maximum length ofsis 1000. Example 1: Input: "babad" Output: "bab" Note: "aba" ...

2018-07-14 10:43:58 91

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除