leetcode走方格起点到终点-LeetCode_Solution:空闲时间做做题

时间:2024-07-20 00:02:35
【文件属性】:

文件名称:leetcode走方格起点到终点-LeetCode_Solution:空闲时间做做题

文件大小:56KB

文件格式:ZIP

更新时间:2024-07-20 00:02:35

系统开源

leetcode走方格起点到终点 LeetCode Solution 题目后第一个框框记录耗费时间在提交时击败网友的百分比 题目后第二个框框记录耗费空间在提交时击败网友的百分比 #1 Two Sum 92.82% 39.78% 用Hash Table加速检索,一边插入一边检索可以实现插完查完出结果。 #2 Add Two Numbers 88.95% 5.14% #3 Longest Substring Without Repeating Characters 82.53% 59.20% 滑窗的方式,头和尾一起前进。 #4 Median of Two Sorted Arrays 99.86% 84.54% 注意到给出的两个数组已排序,直接快速合并取中位数就好。 #5 Longest Palindromic Substring 91.17% 62.76% 先寻找中心块,可为空,然后向左右延申寻找最长的对称字符串,计算当前长度和历史最长进行比较,更大就覆盖。 #6 ZigZag Conversion 94.01% 100.00% 简单分发后拼起来效率也挺高,但应注意到每组有(2 x 行数


【文件预览】:
LeetCode_Solution-master
----README.md(23KB)
----Algorithms()
--------#23 Merge k Sorted Lists.cpp(818B)
--------#42 Trapping Rain Water.cpp(858B)
--------#86 Partition List.cpp(1KB)
--------#22 Generate Parentheses (Poor Solution).cpp(641B)
--------#3 Longest Substring Without Repeating Characters.cpp(2KB)
--------#5 Longest Palindromic Substring.cpp(933B)
--------#34 Find First and Last Position of Element in Sorted Array.cpp(1KB)
--------#22 Generate Parentheses (Reference Better Solution 1).cpp(2KB)
--------#19 Remove Nth Node From End of List.cpp(1KB)
--------#43 Multiply Strings.cpp(1KB)
--------#81 Search in Rotated Sorted Array II.cpp(2KB)
--------#39 Combination Sum.cpp(1KB)
--------#50 Pow(x, n).cpp(610B)
--------#75 Sort Colors.cpp(889B)
--------#4 Median of Two Sorted Arrays.cpp(1KB)
--------#69 Sqrt(x).cpp(295B)
--------#91 Decode Ways.cpp(975B)
--------#83 Remove Duplicates from Sorted List.cpp(1KB)
--------#73 Set Matrix Zeroes.cpp(1KB)
--------#22 Generate Parentheses (Reference Better Solution 2).cpp(975B)
--------#74 Search a 2D Matrix.cpp(903B)
--------#18 4Sum.cpp(2KB)
--------#44 Wildcard Matching.cpp(1KB)
--------#88 Merge Sorted Array.cpp(616B)
--------#41 First Missing Positive.cpp(2KB)
--------#27 Remove Element.cpp(560B)
--------#67 Add Binary.cpp(1KB)
--------#21 Merge Two Sorted Lists.cpp(1001B)
--------#54 Spiral Matrix.cpp(845B)
--------#84 Largest Rectangle in Histogram.cpp(1KB)
--------#25 Reverse Nodes in k-Group.cpp(1KB)
--------#59 Spiral Matrix II.cpp(780B)
--------#94 Binary Tree Inorder Traversal.cpp(667B)
--------#17 Letter Combinations of a Phone Number.cpp(1KB)
--------#8 String to Integer (atoi).cpp(1KB)
--------#29 Divide Two Integers.cpp(2KB)
--------#14 Longest Common Prefix.cpp(911B)
--------#33 Search in Rotated Sorted Array.cpp(840B)
--------#10 Regular Expression Matching.cpp(1KB)
--------#66 Plus One.cpp(967B)
--------#1 Two Sum.cpp(1KB)
--------#31 Next Permutation.cpp(814B)
--------#82 Remove Duplicates from Sorted List II.cpp(1KB)
--------#11 Container With Most Water.cpp(707B)
--------#28 Implement strStr().cpp(661B)
--------#62 Unique Paths.cpp(525B)
--------#35 Search Insert Position.cpp(772B)
--------#26 Remove Duplicates from Sorted Array.cpp(816B)
--------#78 Subsets.cpp(880B)
--------#70 Climbing Stairs.cpp(378B)
--------#24 Swap Nodes in Pairs.cpp(682B)
--------#55 Jump Game.cpp(915B)
--------#36 Valid Sudoku.cpp(3KB)
--------#47 Permutations II.cpp(823B)
--------#13 Roman to Integer.cpp(736B)
--------#56 Merge Intervals.cpp(2KB)
--------#38 Count and Say.cpp(495B)
--------#12 Integer to Roman.cpp(1KB)
--------#98 Validate Binary Search Tree.cpp(799B)
--------#9 Palindrome Number.cpp(842B)
--------#58 Length of Last Word.cpp(403B)
--------#100 Same Tree.cpp(555B)
--------#7 Reverse Integer.cpp(515B)
--------#48 Rotate Image.cpp(668B)
--------#2 Add Two Numbers.cpp(1001B)
--------#93 Restore IP Addresses.cpp(2KB)
--------#61 Rotate List.cpp(908B)
--------#53 Maximum Subarray.cpp(368B)
--------#15 3Sum.cpp(1KB)
--------#63 Unique Paths II.cpp(1KB)
--------#49 Group Anagrams.cpp(666B)
--------#76 Minimum Window Substring.cpp(4KB)
--------#16 3Sum Closest.cpp(1KB)
--------#40 Combination Sum II.cpp(2KB)
--------#46 Permutations.cpp(2KB)
--------#6 ZigZag Conversion.cpp(1KB)
--------#80 Remove Duplicates from Sorted Array II.cpp(509B)
--------#71 Simplify Path.cpp(904B)
--------#20 Valid Parentheses.cpp(1KB)
--------#79 Word Search.cpp(2KB)

网友评论