自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(118)
  • 资源 (1)
  • 问答 (1)
  • 收藏
  • 关注

原创 LeetCode刷题中用到的C++知识点整理

持续更新中……链表:1. 链表基本都要使用递归2. 新建节点的方法:ListNode *N=new ListNode(初始值);3. 判断节点是否为空:N==NULL,N->next==NULL4. 取出节点中的值: N->val...

2019-05-08 11:23:30 920

原创 LeetCode刷题笔记目录

猪年要加油!1.Two Sum2.Add Two Numbers3.Longest Substring Without Repeating Characters5.Longest Palindromic Substring6.ZigZag Conversion7.Reverse interger8. String to Integer (atoi)...

2019-01-29 10:35:22 187

原创 LeetCode刷题笔记C++ 155 Min Stack

这道题比较简单,就是挨个写函数,需要在最前面定义一个数组来存放。class MinStack {public: vector<int> con; MinStack() { con.clear(); } void push(int x) { con.push_back(x); return; }...

2019-08-04 01:54:04 225

原创 LeetCode刷题笔记C++ 141 Linked List Cycle

141. Linked List Cycle解题思路:记录下每次head的地址,写到vector里,如果发现有重复,就返回true,如果到底了都没重复,就返回false。(网上看搜索了一下,基本上千篇一律都是快慢指针的写法,很奇怪)/*** Definition for singly-linked list.* struct ListNode {* int v...

2019-08-04 00:27:03 164

原创 LeetCode刷题笔记C++ 136. Single Number

136. Single Number这道题比较简单,一遍过。解题思路是先排序,然后用AB两个指针从头开始一个一个检索。如果A已经是最后一个了,直接返回A。如果A不等于B,返回A。其他情况A=A+2,B=B+2。class Solution {public: int singleNumber(vector<int>& nums) { sor...

2019-08-02 02:55:28 182

原创 美国L2申请EAD工卡_含P.O. box申请

美国L2申请EAD工卡已经到美国一个周了,今天终于在这周周五的下午寄出了EAD的申请材料。一周的时间主要花费在准备工作上,加上美国的邮政系统和中国差异较大,银行也是。下面是主要的解决路径:1.准备电话号码2.准备地址3.准备支票4.准备EAD申请材料5.邮局寄送—----------------------------------------———分割线——————...

2019-07-06 07:58:36 1668 2

原创 bit-位 byte-字节

char=2B=16b

2019-05-23 18:11:20 119

原创 CString.Format参数

在用周立功USB-CAN时,发现里面大量使用CString.Format。我上网搜索了一下,自己手写一遍,加深记忆。CAN盒示例代码如下:CString str,tmpstr;tmpstr.Format("帧ID:%08x ",frameinfo[i].ID);str+=tmpstr;如果要取3位的话:tmpstr.Format("%03x",frameinfo[i].I...

2019-05-23 09:24:07 591

原创 LeetCode刷题笔记--89. Gray Code

中间停了几天没有刷题,因为种种原因。今天开始恢复刷题,加油!89.Gray CodeMedium3691147FavoriteShareThe gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer...

2019-05-20 16:56:49 131

原创 LeetCode刷题笔记--82. Remove Duplicates from Sorted List II

82.Remove Duplicates from Sorted List IIMedium78570FavoriteShareGiven a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list....

2019-05-09 13:39:11 119

原创 LeetCode刷题笔记--81. Search in Rotated Sorted Array II

81.Search in Rotated Sorted Array IIMedium630301FavoriteShareSuppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e.,[0,0,1,2,2,5,6]might become...

2019-05-09 10:09:22 112

原创 LeetCode刷题笔记--80. Remove Duplicates from Sorted Array II

80.Remove Duplicates from Sorted Array IIMedium623520FavoriteShareGiven a sorted arraynums, remove the duplicatesin-placesuch that duplicates appeared at mosttwiceand return the new length...

2019-05-08 17:30:57 96

原创 LeetCode刷题笔记--79. Word Search

79.Word SearchMedium167481FavoriteShareGiven 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 "adjacent...

2019-05-08 10:48:38 128

原创 LeetCode刷题笔记--75. Sort Colors

75.Sort ColorsMedium1557148FavoriteShareGiven an array withnobjects colored red, white or blue, sort themin-placeso that objects of the same color are adjacent, with the colors in the order...

2019-05-07 10:01:12 166

原创 LeetCode刷题笔记--74. Search a 2D Matrix

74.Search a 2D MatrixMedium79196FavoriteShareWrite an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorte...

2019-05-06 16:50:55 96

原创 LeetCode刷题笔记--73. Set Matrix Zeroes

73.Set Matrix ZeroesMedium993189FavoriteShareGiven amxnmatrix, if an element is 0, set its entire row and column to 0. Do itin-place.Example 1:Input: [ [1,1,1], [1,0,1], [1,1,1...

2019-05-06 15:27:08 161

原创 LeetCode刷题笔记--71. Simplify Path

71.Simplify PathMedium4081140FavoriteShareGiven anabsolute pathfor a file (Unix-style), simplify it. Or in other words, convert it to thecanonical path.In a UNIX-style file system, a perio...

2019-05-06 13:34:37 117

原创 LeetCode刷题笔记--64. Minimum Path Sum

64.Minimum Path SumMedium128437FavoriteShareGiven amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path....

2019-05-05 10:25:27 131

原创 LeetCode刷题笔记--63. Unique Paths II

63.Unique Paths IIMedium816104FavoriteShareA robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any ...

2019-04-30 15:08:06 887

原创 LeetCode刷题笔记--62. Unique Paths

62.Unique PathsMedium1473104FavoriteShareA robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any po...

2019-04-30 11:44:23 147

原创 LeetCode刷题笔记--61. Rotate List

61. Rotate ListMediumGiven a linkedlist, rotate the list to the right by k places, where k is non-negative.Example 1:Input: 1->2->3->4->5->NULL, k = 2Output: 4->5->1-&g...

2019-04-29 17:10:54 103

原创 LeetCode刷题笔记--59. Spiral Matrix II

59. Spiral Matrix IIMediumGiven a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.Example:Input: 3Output:[ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7, 6...

2019-04-29 10:28:20 106

原创 LeetCode刷题笔记--56. Merge Intervals

56. Merge IntervalsGiven a collection of intervals, merge all overlapping intervals.Example 1:Input: [[1,3],[2,6],[8,10],[15,18]]Output: [[1,6],[8,10],[15,18]]Explanation: Since intervals [1,...

2019-04-26 15:58:21 165

原创 LeetCode刷题笔记--55. Jump Game

最近很忙,好久没更新了,重新刷起来!55. Jump GameMediumGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jum...

2019-04-26 13:33:53 134

原创 LeetCode刷题笔记--49. Group Anagrams

49.Group AnagramsMedium1491104FavoriteShareGiven an array of strings, group anagrams together.Example:Input: ["eat", "tea", "tan", "ate", "nat", "bat"],Output:[ ["ate","eat","tea"], ...

2019-04-12 10:38:06 114

原创 LeetCode刷题笔记--48. Rotate Image

48.Rotate ImageMedium1406137FavoriteShareYou are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Note:You have to rotate the imagein-place, whic...

2019-04-12 09:48:48 175

原创 LeetCode刷题笔记--43. Multiply Strings

43.Multiply StringsMedium911408FavoriteShareGiven two non-negative integersnum1andnum2represented as strings, return the product ofnum1andnum2, also represented as a string.Example 1:...

2019-04-11 16:17:28 148

原创 LeetCode刷题笔记--36. Valid Sudoku

36.Valid SudokuMedium781275FavoriteShareDetermine if a9x9 Sudoku boardis valid.Only the filled cells need to be validatedaccording to the following rules:Each rowmust contain thedigits...

2019-04-10 10:06:16 92

原创 LeetCode刷题笔记--34. Find First and Last Position of Element in Sorted Array

34.Find First and Last Position of Element in Sorted ArrayMedium141677FavoriteShareGiven an array of integersnumssorted in ascending order, find the starting and ending position of a giventa...

2019-04-09 09:02:34 90

原创 LeetCode刷题笔记--31. Next Permutation

31.Next PermutationMedium1601489FavoriteShareImplementnext permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not pos...

2019-04-08 11:11:14 142

原创 LeetCode刷题笔记--24. Swap Nodes in Pairs

24.Swap Nodes in PairsMedium100890FavoriteShareGiven alinked list, swap every two adjacent nodes and return its head.You maynotmodify the values in the list's nodes, only nodes itself may ...

2019-04-06 10:50:25 82

原创 LeetCode刷题笔记--22. Generate Parentheses

22.Generate ParenthesesMedium2514153FavoriteShareGivennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution se...

2019-04-04 14:34:01 69

原创 LeetCode刷题笔记--19. Remove Nth Node From End of List

19.Remove Nth Node From End of ListMedium1592124FavoriteShareGiven a linked list, remove then-th node from the end of list and return its head.Example:Given linked list: 1->2->3-&gt...

2019-03-26 14:06:19 93

原创 LeetCode刷题笔记--18. 4Sum

18.4SumMedium936190FavoriteShareGiven an arraynumsofnintegers and an integertarget, are there elementsa,b,c, anddinnumssuch thata+b+c+d=target? Find all unique quadruplets ...

2019-03-25 14:31:39 82

原创 LeetCode刷题笔记--17. Letter Combinations of a Phone Number

17.Letter Combinations of a Phone NumberMedium1944266FavoriteShareGiven a string containing digits from2-9inclusive, return all possible letter combinations that the number could represent....

2019-03-25 11:58:16 82

原创 LeetCode刷题笔记--16. 3Sum Closest

16.3Sum ClosestMedium96078FavoriteShareGiven an arraynumsofnintegers and an integertarget, find three integers innumssuch that the sum is closest totarget. Return the sum of the three i...

2019-03-25 09:15:48 95

原创 LeetCode刷题笔记--11. Container With Most Water

11.Container With Most WaterMedium2860410FavoriteShareGivennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that t...

2019-03-22 11:47:08 118

转载 LeetCode刷题笔记--108. Convert Sorted Array to Binary Search Tree

108.Convert Sorted Array to Binary Search TreeEasy1005103FavoriteShareGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.For this problem, a heig...

2019-03-21 11:48:28 59

原创 LeetCode刷题笔记--101. Symmetric Tree

101.Symmetric TreeEasy197145FavoriteShareGiven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree[1,2,2,3,4,4,3]is symmetr...

2019-03-21 10:36:02 101

原创 LeetCode刷题笔记--83. Remove Duplicates from Sorted List

83.Remove Duplicates from Sorted ListEasy68575FavoriteShareGiven a sorted linked list, delete all duplicates such that each element appear onlyonce.Example 1:Input: 1->1->2Output: ...

2019-03-19 17:33:41 74

VB.NET 15分钟倒计时小程序

VB.NET 15分钟倒计时小程序 VB.NET 15分钟倒计时小程序 VB.NET 15分钟倒计时小程序 VB.NET 15分钟倒计时小程序

2017-09-01

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

TA关注的人

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