刷题顺序表 Array

题号 题目链接 说明
基础
27 Remove Element
26 Remove Duplicates from Sorted Array
80 Remove Duplicates from Sorted Array II
277 Find the Celebrity
189 Rotate Array
41 First Missing Positive
299 Bulls and Cows
134 Gas Station
118 Pascal‘s Triangle 很少考
119 Pascal‘s Triangle II 很少考
169 Majority Element 很少考
229 Majority Element II 很少考
274 H-Index
275 H-Index II Binary Search
243 Shortest Word Distance
244 Shortest Word Distance II
245 Shortest Word Distance III
217 Contains Duplicate
219 Contains Duplicate II 很少考
220 Contains Duplicate III 很少考
55 Jump Game
45 Jump Game II
121 Best Time to Buy and Sell Stock
122 Best Time to Buy and Sell Stock II
123 Best Time to Buy and Sell Stock III
188 Best Time to Buy and Sell Stock IV
309 Best Time to Buy and Sell Stock with Cooldown
11 Container With Most Water
42 Trapping Rain Water
334 Increasing Triplet Subsequence
128 Longest Consecutive Sequence
164 Maximum Gap Bucket
287 Find the Duplicate Number
135 Candy 很少考
330 Patching Array 很少考
提高
4 Median of Two Sorted Arrays 很少考
321 Create Maximum Number 很少考
327 Count of Range Sum
289 Game of Life
Interval
57 Insert Interval
56 Merge Intervals
252 Meeting Rooms
253 Meeting Rooms II
352 Data Stream as Disjoint Intervals TreeMap
Counter
239 Sliding Window Maximum
295 Find Median from Data Stream
53 Maximum Subarray
325 Maximum Size Subarray Sum Equals k
209 Minimum Size Subarray Sum
238 Product of Array Except Self
152 Maximum Product Subarray
228 Summary Ranges
163 Missing Ranges
Counter
88 Merge Sorted Array
75 Sort Colors
283 Move Zeroes
376 Wiggle Subsequence
280 Wiggle Sort
324 Wiggle Sort II
278 First Bad Version
35 Search Insert Position
33 Search in Rotated Sorted Array
81 Search in Rotated Sorted Array II
153 Find Minimum in Rotated Sorted Array
154 Find Minimum in Rotated Sorted Array II
162 Find Peak Element
374 Guess Number Higher or Lower
34 Find First and Last Position of Element in Sorted Array
349 Intersection of Two Arrays
350 Intersection of Two Arrays II
315 Count of Smaller Numbers After Self
300 Longest Increasing Subsequence
354 Russian Doll Envelopes

https://cspiration.com/leetcodeClassification#10309

原文地址:https://www.cnblogs.com/Akarinnnn/p/12114656.html

时间: 2024-08-06 20:49:15

刷题顺序表 Array的相关文章

LeetCode 刷题顺序表

Id Question Difficulty Frequency Data Structures Algorithms 1 Two Sum 2 5 array + set sort + two pointers 2 Add Two Numbers 3 4 linked list two pointers + math 3 Longest Substring Without Repeating Characters 3 2 string + hashtable two pointers 4 Med

力扣刷题记录(一)

今天开始正式刷题,为找工作做准备,这篇博客用来记录一下:刷题顺序是先刷hot题目前100个 1.两数之和: 比较简单,一次就做出来. 思路:python的字典是哈希存储的,看了一下dict内置方法只有has_key,所以将值作为key,下标作为value,存储字典,然后遍历列表,以当前值为基准,用has_key判断(target-当前值)是否存在,存在则返回相应的下标即可.,代码如下: class Solution(object): def twoSum(self, nums, target):

刷题之路第四题--取两个顺序数组的数值的中位数

Median of Two Sorted Arrays 简介:取两个顺序数组的数值的中位数 问题详解: 给定两个排序的数组nums1和nums2分别为m和n,我们需要的是两个数组中所组成一个数列的中位数. 注意: 1.需要判断数组NPE 2.结果不是int 举例 1: nums1 = [1, 3] nums2 = [2] 中位数是 2.0 2: nums1 = [1, 2] nums2 = [3, 4] 中位数是 (2 + 3)/2 = 2.5 JAVA 实现方法一: 通过NPE判断后将两个数组

【leetcode刷题笔记】Remove Duplicates from Sorted Array II

Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array A = [1,1,1,2,2,3], Your function should return length = 5, and A is now [1,1,2,2,3]. 题解: 设置两个变量:右边kepler和前向游标forward.如果当前kepeler所指的元素和

OJ刷题之《输入三个整数,按由小到大的顺序输出》

题目描述 输入三个整数,按由小到大的顺序输出.分别使用指针和引用方式实现两个排序函数.在主函数中输入和输出数据. 输入 三个整数 输出 由小到大输出成一行,每个数字后面跟一个空格.由指针方式实现. 由小到大输出成一行,每个数字后面跟一个空格.由引用方式实现. 样例输入 2 3 1 样例输出 1 2 3 1 2 3 提示 主函数已给定如下,提交时不需要包含下述主函数 /* C++代码 */ int main() { void sort1(int *,int *,int *); void sort2

【leetcode刷题笔记】Search in Rotated Sorted Array

Suppose a sorted array 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). You are given a target value to search. If found in the array return its index, otherwise return -1. You may assume no duplic

【leetcode刷题笔记】Search in Rotated Sorted Array II

Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a function to determine if a given target is in the array. 题解:如果没有重复的元素,那么就可以根据target是否在某一半而扔掉另外一半.但是如果有

LeetCode开心刷题五十一天——118. Pascal's Triangle 接触跳转表概念,不知用处 lamda逗号导致表达式加法奇怪不理解119. Pascal's Triangle II

118. Pascal's Triangle Easy 87984FavoriteShare Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers directly above it. Example: Input: 5 Output: [ [1],

顺序表算法题

在长度为n(n<1000)的顺序表中可能存在着一些值相同的"多余"数据元素(类型为整型),编写一个程序将"多余"的数据元素从顺序表中删除,使该表由一个"非纯表"(值相同的元素在表中可能有多个)变成一个"纯表"(值相同的元素在表中只能有一个). Input 第一行输入表的长度n: 第二行依次输入顺序表初始存放的n个元素值. Output 第一行输出完成多余元素删除以后顺序表的元素个数: 第二行依次输出完成删除后的顺序表元素