楼主: creazy-lobster
跳转到指定楼层
上一主题 下一主题
收起左侧

刷题打卡贴

🔗
 楼主| creazy-lobster 2019-3-5 15:51:57 | 只看该作者
全局:
第十天打卡,math里面第sum问题

#
名称
类型
题目
解题
1
Math
高频
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,

Because nums[0] + nums[1] = 2 + 7 = 9,
return [0, 1].
太经典了,做了很多遍了,就是用一个map,key来存target-cur,
value存当前值的index,所以每次我们只需要检测当前值是否
在map中就知道是否有两值和为target了。

167
Math
中高频
Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.
Example:
Input: numbers = [2,7,11,15], target = 9
Output: [1,2]
Explanation: The sum of 2 and 7 is 9. Therefore index1 = 1, index2 = 2.
这题的前提是数组是排好序的,那我们就用two-pointer方法来做。
初始化指向数组两端,小于target移动左指针,大于移动右指针,等于返回index。
15
Math
FB高频
Given array nums = [-1, 0, 1, 2, -1, -4],

A solution set is:
[
  [-1, 0, 1],
  [-1, -1, 2]
]
找3个数和等于0的所有组合,首先需要把原数组排序,
然后我们遍历数组,用i+1作为子窗口的左边界,
num取负作为target,所以题目从这里又变成了在数组里找2个数等于target。
排序O(nlogn), 查找O(n^2)
16
Math
中低频
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 the three integers. You may assume that each input would have exactly one solution.
Example:
Given array nums = [-1, 2, 1, -4], and target = 1.

The sum that is closest to the target is 2. (-1 + 2 + 1 = 2).
和上一题同样的套路,只是需要多一个步骤,
用一个变量minDistrack当前最小距离。
然后每次循环出一个sum的时候,如果abs(s-target)的
值比minDis小,就更新小minDis。
259
Math
低频
Input: nums = [-2,0,1,3], and target = 2
Output: 2
Explanation: Because there are two triplets which sums are less than 2:
             [-2,0,1]
             [-2,0,3]
这题要求3个数加起来和小于target的组合有几对。
和上面的3sum思路差不多,这里我们每次用和去与target
比较,如果小于,就把当前left-left加到count里面,因为排序后
右边界的数最大,加起来和都小于target,那么left到left之间的数
加起来和也小于target,然后移动left。如果大于就移动left指针。

回复

使用道具 举报

🔗
 楼主| creazy-lobster 2019-3-6 15:47:19 | 只看该作者
全局:
第十天打卡

#
名称
Tag& 频率
题目
解题
27
Array,
Two-pointer
低频
Given an array nums and a value val, remove all instances of that value in-place and return the new length.
Ex: Given nums = [3,2,2,3], val = 3,
      Given nums = [0,1,2,2,3,0,4,2], val = 2,
题目要求原地置换,返回新数组的长度,而且不管你数组后面是什么,
所以我们只需要用two-pointer,一前一后,if遇到等于val的数就置换,
然后移动右指针,else移动左指针。注意有可能右指针的数等于val,
所以置换的时候不移动左指针。
26
Array,
Two-pointer
中频
Given a sorted array nums, remove the duplicates in-place such that
each element appear only once and return the new length.
Ex:  Given nums = [1,1,2], return 2
       Given nums = [0,0,1,1,1,2,2,3,3,4],  return 5
同上题相似,但是这次是删除数组里重复的数字,让每个数字只出现一次。
思路也是Two-pointer,两个指针从头开始,遇到相同的值移动右指针,
遇到不同先移动左指针然后在把右指针的数赋值给左指针,
最后返回左指针+1作为新数组长度
80
Array,
Two-pointer
低频
Given a sorted array nums, remove the duplicates in-place such that duplicates
appeared at most twice and return the new length.
Ex: Given nums = [1,1,1,2,2,3], return 5
Given nums = [0,0,1,1,1,1,2,3,3], return 7
26的变形题,现在数字可以重复最多2次。解题思路任然是two-pointer,
这里需要多一个check,我们需要check当前左指针l-2的值是否小于当前
右指针的值r。如果小于的话我们就知道当前左指针值出现超过2次需要替换,
不小于的话就移动右指针直到找到更大的数出现。
277
Array
中高频
Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity.
The definition of a celebrity is that all the other n - 1 people know him/her but he/she does not know any of them.
扫描两遍数组,第一遍,用一个变量来存candidate,
遍历过程中如果candidate认识i,就把candidate换成i,
这样遍历完我们就能拿到一个可能的candidate。
因为这个题就像一个有向图, 你走一遍总会走到那个没有出口的节点。
第二遍我们遍历数组,检查如果candidate有认识的人或者有人认识他,就返回false。
189
Array
中低频
Given an array, rotate the array to the left by k steps, where k is non-negative.
Ex:Input: [1,2,3,4,5,6,7] and k = 3
Output: [5,6,7,1,2,3,4]
题目要求把数组的值反转k位,这个题有多种解法,
此题一种解法就是reverse大法,先把0到k-1 和k到n的数分两组反转
然后在反转整个数组,如下。
[1,2,3,4,5,6,7]
[4,3,2,1, 7,6,5]
[5,6,7,1,2,3,4]
41
Array
中频
Given an unsorted integer array, find the smallest missing positive integer.
Ex:
Input: [1,2,0]
Output: 3
Input: [3,4,-1,1]
Output: 2
要求找出数组中不纯在的最小的正整数。所以给定一个n长度的数组,
我们只用关心1到n的数,其他的都忽略。
这里我们需要用一个数组的index做映射,比如3就应该放在num[2]的位置,
我们从头遍历数组,把里面的值换到相应位置,最后从头在遍历一遍,
第一个不match的数就是要找的最小整数。
[3,4,-1,1] 置换后 [1,-1,3,4]
299
Array
G高频
You are playing the following Bulls and Cows game with your friend:
You write down a number and ask your friend to guess what the number is.
Each time your friend makes a guess, you provide a hint that indicates how many
digits in said guess match your secret number exactly in both digit and position
(called "bulls") and how many digits match the secret number but locate in the
wrong position (called "cows").
Your friend will use successive guesses and hints to eventually derive the secret number.
Write a function to return a hint according to the secret number and friend's guess,
use A to indicate the bulls and B to indicate the cows.
Please note that both secret number and friend's guess may contain duplicate digits.
Ex:
Input: secret = "1807", guess = "7810"
Output: "1A3B”
Explanation: 1 bull and 3 cows. The bull is 8, the cows are 0, 1 and 7.
这题其实可以分成两个部分,第一部分求bull,第二部分求cows。
先看第一部分,很简单,我们从头到尾遍历时候发现相等就把bull加上。
当两个数不相等时候,我们来求cows,由于cows是求guess中位置不对,
但是数字对的数的个数,比较简单的方法就是开两个数组或者map,
分别记录secret,guess里面的数字出现的次数,最后我们找出有overlap的数字,
取secret,guess里面出现次数小的加到cows里面去。比如
secret = "1123", guess = "0111”
A={’1’: 1, ’2’:1, ’3’:1}
B={’0’: 1, ’1’: 2}
A,B分别存了不相等的数字出现次数,现在只要遍历B,
把数字与A的出现次数取最小值, 0在A里面没有,错误guess,跳过。
1在A里面有,值为1,小于guess的2,所以cows += 1


回复

使用道具 举报

🔗
 楼主| creazy-lobster 2019-3-7 15:56:51 | 只看该作者
全局:
第12天打卡
134
Array,
Greedy
低频
There are N gas stations along a circular route, where the amount of gas at station i is gas.
You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station [i]i
to its next station (i+1). You begin the journey with an empty tank at one of the gas stations.
Return the starting gas station's index if you can travel around the circuit once in the clockwise direction, otherwise return -1.
[/i][/i]
这个题可以分2部解题:
第一根据题意我们知道每个加油站可以求得gasRemain = gas - cost[i],
当所有gasRemain加在一起的时候如果是大于0的那必定有一个起点,
小于0直接返回-1。
第二步,假设从A开始,到达不来C点,那么A到C之间的点都
不能到达C点。因为我们在C点之前,gasRemain + gas < cost[B]
可以看出gasRemain为正数B点是不可能直接到达C点的,以此类推。
所以我们只需要在遍历的时候遇到到达不了的更新起始地点最后就能找到。
[/i]
118
Array
Math,
中低频
Given a non-negative integer numRows, generate the first numRows of Pascal's triangle.
Ex:
[b]Input: 5
Output:
[
     [1],
    [1,1],
   [1,2,1],
  [1,3,3,1],
[1,4,6,4,1]
]
纯数学题,按照规律写,就是要注意下数组index。
119
Array
Math
低频
Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle.
Note that the row index starts from 0.
同上,只是现在要求某一行,可以用上题解法,但是可以优化下空间,
只使用O(K)空间。就是从上到下生成新一列的时候从右往左跟新就好了。
169
Array
Math,
中低频
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.
Ex:
Input: [3,2,3]
Output: 3
要找出现次数超过一半的数,最简单暴力的就是先排序数组然后返回中间数,
时间复杂度O(nlogn).
第二张方法用计数法,初始化第一个数为我们的major element,然后count 为1,
  从index 1 往后遍历,3个case:
  1. count == 0,我们就把当前值更新成major element,
  2. 当前值和major element相等,我们就count++。
  3. 其他情况就count--。
  这种解法时间复杂度O(n), 但leetcode两种方法跑出来第一种还快
229
Array
Math,
中低频
Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times.
Note: The algorithm should run in linear time and in O(1) space.
Example 1:
Input: [3,2,3]
Output: [3]
上题的follow up, 要求所有出现次数大于1/3的数,也就是说最多有2个数,所以我们只需要按照1的解法,加一个count给第二次数出现多的数。
-----
---------------------------------------------
---------------
--------------------------------------------------------------------------------------------
------------------------------------------------------------
274
Array,
Bucket
低频
Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index.
Ex:
Input: citations = [3,0,6,1,5]
Output: 3
这题刚开始的时候去查了下才搞懂题意,H-index用来评估学术人员发表paper的数量和质量。求发表论文的H-index, 给定一个数组,代表每篇论文被引用的次数,数组长度就是论文数量n,当论文引用等于或超过n时候只算1分,然后从大到小count,直到count大于paper的index。例子:
[3,0,6,1,5]
我们先count次数,如下, 大于等于5有两个
index 0 1 2 3 4 5
          1 1 0 1 0 2
然后我们从右到左累加count直到大于等于index,所以这里是index 3
275
Binary Search
超低频
Given an array of citations sorted in ascending order(each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index.
Ex:
Input: citations = [0,1,3,5,6]
Output: 3
上一题的变形,现在给定数组是排序的,然后我们可以看出规律用二分法,当前index的值等于paper index时候就是我们要找的index。当citations数量大于index时候就往左边寻找,反之往右边。


回复

使用道具 举报

🔗
 楼主| creazy-lobster 2019-3-8 15:58:35 | 只看该作者
全局:
第十三天,数组类。

243
Array
L家中低频
Given a list of words and two words word1 and word2,
return the shortest distance between these two words in the list.
要求找两个单词在数组里面的最小距离,单词可能有重复。
设置两个index当遇到要找的单词就更新index,算距离更新结果就好。
244
Array
L家中频
Design a class which receives a list of words in the constructor,
and implements a method that takes two words word1 and word2 and
return the shortest distance between these two words in the list.
Your method will be called repeatedly many times with different parameters.
上一题的follow up,现在要求写个class,如果用上一题方法也可解,就是太慢了。
优化方法就是在初始化的时候建一个map,把单词和其对应的位置们建立映射。
然后在寻找距离的方法里面,我们取出两个单词的位置数组,从头开始遍历,
每次计算更新当前最短距离。
另一个优化就是我们比较完了后移动2个单词当前位置较小的一个
例子’cat’:[3], ‘bot’:[1,2,5, 6, 7], 我们能看到cat的index为3,所以
前2次比较会移动bot的index,直到5>3的时候我们移动‘cat’发现到达终点
结束遍历,因为6,7的距离不用比较也知道不会比5到3的距离短。
245
Array
L家低频
Given a list of words and two words word1 and word2,
return the shortest distance between these two words in the list.
word1 and word2 may be the same and
  they represent two individual words in the list.
现在给的两个单词可能是一样的,我们只需要在第一题的解题上加一个判断,
就是当找到第二个单词的时候,我们判断两个单词是否相等,
如果相等就把idx1 = idx2, 然后idx2 = i, 这样idx1就是单词的前一个位置。

217
Array
低频
Given an array of integers, find if the array contains any duplicates.
Ex:
Input: [1,2,3,1]
Output: true
简单判断下数组里面是否有重复。暴力解法O(n^2), 把所有pair找出来对比。
第二种解法把数组排序,然后从头开始对比,时间复杂度O(nlogn)
第三种解法用set的话可以做到时间空间复杂度O(n)。
219
Array
低频
Given an array of integers and an integer k, find out whether there are two distinct
indices i and j in the array such that nums = nums[j]
and the absolute difference between [i]i
and j is at most k.
Ex:
Input: nums = [1,2,3,1], k = 3
Output: true
[/i]
上题follow up, 问数组里有没有相同的两个数之间的index距离小于等于k。
这样的话我们就需要记录数上一次出现的index了,所以这题用map,
key为数字,value为上一次出现的index,
所以当找到相同数字时候一减就知道是否小于k了,
注意大于k的话要把数字map里的值更新为当前index作为下一次对比起点。
220
Array
低频
Given an array of integers, find out whether there are two distinct indices i and j
in the array such that the absolute difference between nums and nums[j]
  is at most [i]t
and the absolute difference between i and j is at most k.
Example 1:
Input: nums = [1,2,3,1], k = 3, t = 0
Output: true
[/i]
这题要求找出数组中两个数,满足2个条件,1:两个数值相差不超过t,
2:两个数的坐标相差不超过k。所以我们可以想到要维护一个长度k的窗口。
也可以看成桶排序,桶宽度为t+1,如果有两个数差值不大于t,那么要么
是当前桶里面,要么是前后两个桶里面。
55
Array
中频
Given 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 jump
length at that position.
Determine if you are able to reach the last index.
Example:
Input: [2,3,1,1,4]
Output: true
Explanation: Jump 1 step from index 0 to 1, then 3 steps to the last index.
要求能不能跳到最后一个index,我们只需要保存当前能跳到的最远距离,
一次遍历之后就知道能不能跳到最后一个位置了。
就拿例子来说,遍历第一个值2,所以可以跳到最远为index 2。
遍历第二个数为3,首先检查当前index是否在能跳到的距离内,
(如果第一个数0, 能跳到最远距离到不了这里就不行),
如果可以就更新最远能跳到index 为3+1 = 4,以此类推。
45
Array,
BFS,
Greedy
中频
Given 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 jump length at that position.
Your goal is to reach the last index in the minimum number of jumps.
Example:
Input: [2,3,1,1,4]
Output: 2
Explanation: The minimum number of jumps to reach the last index is 2.
    Jump 1 step from index 0 to 1, then 3 steps to the last index.
jump game follow up,要求最少次数的jump到达最后index,
注意他assume you can always reach last index. 这题可以用bfs, 贪心解决。
这里用了贪心算法,主要思想是维护一个当前最远能跳到的window,
遍历过程中不断更新能跳到最远的index,比如例子第一个位为2,
当遍历到当前window最后一位2的时候就必须要jump了,
然后更新window的右边界为当前最远index,
这里最远就是window里面能跳到到最远距离,
以此下去就是到最后一位到最短跳数。
121
Array
超高频
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction
(i.e., buy one and sell one share of the stock),
design an algorithm to find the maximum profit.
Ex:
Input: [7,1,5,3,6,4]
Output: 5
买卖股票第一题,只能做一次transacton,求最大profit。
我们知道求最大profit其实是求股票中一个波峰和一个波谷最大到差值。
由于要低价买高价出,我们需要找波谷波峰,
所以在遍历过程中我们首先需要一个变量存当前最小值(波谷)。
然后在遍历过程中,不断更新当前能赚到到max profit,最后既能得到最大profit。
122
Array
中频
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit.
You may complete as many transactions as you like
  (i.e., buy one and sell one share of the stock multiple times).
Ex:
Input: [7,1,5,3,6,4]
Output: 7
第二题可以做任意多次交易,这次其实是求所有从波谷到波峰到差值到和。
我们只需要在遍历过程中在单调递增到时候把profit加入总profit就好了。
123
Array,
DP
低频
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete at most two transactions.
Ex:
Input: [3,3,5,0,0,3,1,4]
Output: 6
第三题,最多交易两次,也就是说两次交易间有一分界线,
分界线左右是各自的最大利润,所以只要从左到右,从右到左计算出当前最大利润,找到那条分界线让两边利润加起来最大就可。
首先我们把第一题用到技巧拿来track maxprofits, 如下
input:       [3,3,5,0,0,3,1,4]
maxPro    [0,0,2,2,2,3,3,3]
然后从后往前遍历, curMax记录当前遇到最大值, maxPro记录当前最大profit
curMax    [5,5,5,4,4,4,4,4]
maxPro    [4,4,4,4,4,3,3,0]
最后两个maxpro数组对应index加起来最大到和为2次transaction最大收益。
188
Array
低频
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete at most k transactions.
Note:
You may not engage in multiple transactions at the same time
(ie, you must sell the stock before you buy again).
Example 1:
Input: [2,4,1], k = 2
Output: 2
Explanation: Buy on day 1 (price = 2) and sell on day 2 (price = 4), profit = 4-2 = 2.
第四题,要求在给定最多k次交易的条件下找出最大收益。
dp解法,把问题分解为subproblems,  dp[j]为第j天做最多i次交易的最大收益。
我们先思考下,要求第j天最大收益,在第j天我们有卖或者不卖两种骚操作,
我们取其中较大的作为这天的最大收益。
然后有dp[i][j] = max(
                                   1. 第j天不做交易的最大profit: dp[i][j-1]         
                                   2. 第j天做交易的最大profit: max(
                                           prices[j] - princes[m] + dp[i-1][m]    (m from 0 to j-1)
                                           第m天买入第j天卖出收益+第m天卖出时最大收益
                                  )
                        )
例子[2, 5, 7 ,1, 4, 3, 1, 3], k = 3
初始化dp数组,第一行第一列为0,因为只有1天不可能做交易,
0次交易也不会有收益。
i    0   1   2   3   4   5   6   7
     2   5   7   1   4   3   1   3
     ---------------------------
0|  0   0   0   0   0   0   0   0
1|  0   0   0   0   0   0   0   0
2|  0   0   0   0   0   0   0   0
3|  0   0   0   0   0   0   0   0
完成第一行后,也就是最多1次交易后
i    0   1   2   3   4   5   6   7
     2   5   7   1   4   3   1   3
     ---------------------------
0|  0   0   0   0   0   0   0   0
1|  0   3   5   5   5   5   5   5
2|  0   0   0   0   0   0   0   0
3|  0   0   0   0   0   0   0   0
比如求dp[1][2]时候,就是求前2天交易1次最大第收益,所以我们先分别算从0天到1天时候买入,第2天卖出的收益加上i-1=0天的最大收益如下,由于0天没有收益所以前一天最大收益都为0,然后m=0也就是0天买入第2天卖出收益最大为5。再算dp[i][j-1] = dp[1][2-1] = 3,就是第2天不做交易时候最大收益,然后5 大于 3所以第二天卖出第0天买入为当前最大收益.
dp[i][j] = max(
                                   dp[i][j-1]         第j天不做交易的最大profit
                                   max(
                                           m = 0: 7-2+0=5
                                           m = 1: 7-5+0=2
                                  )
                        )
[/i][/i][/i][/i][/i]




回复

使用道具 举报

🔗
 楼主| creazy-lobster 2019-3-9 15:38:49 | 只看该作者
全局:
第十四天, 数组类型


11
Array
中高频
Given n non-negative integers a1, a2, ..., an ,
where each represents a point at coordinate (i, ai).
n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0).
Find two lines, which together with x-axis forms a container,
such that the container contains the most water.
https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/17/question_11.jpg
这题要求容器的两边使得两边之间能装最多的水。
首先我们可以把整个数组看成一个大容器,
他能装的水容量是两点中的较小值乘以两点间距离,
因为我们要找最大容器所以我们就持续比较两点,
总是移动最小的点来优化容器容积,
并过程中不断更新当前最大容积。
42
Array
超高频
Given n non-negative integers representing an elevation map where
the width of each bar is 1,
compute how much water it is able to trap after raining.
EX:
Input: [0,1,0,2,1,0,1,3,2,1,2,1]
Output: 6
https://assets.leetcode.com/uploads/2018/10/22/rainwatertrap.png
看起来和上题类似,但完全不一样但题,这一题bar的高度会影响积水的多少。
解题思路如下,我们从左到右遍历,我们要tracking last peak,就是上一次遇见的最高的bar。
在遍历过程中,如果当前bar小于last peak,我们就把当前的可以装水量算出来
last_peak-bar放到一个变量中cur_water;
如果当前bar高度等于或者大于last peak,意味着我们已经找到一个凹槽,
首先把当前算出来的水量加入总水量然后清零,之后更新下last_peak继续找下一个凹槽。
注意这只能找到递增的凹槽,所以我们要做的就是从右往左在扫描一边把递减的加进来,这里有一个case不需要考虑就是等于的时候,因为之前算过了就不要重复计算了。
这题可以优化成一次遍历,就是需要同时track 左右的last_peak,然后比较大小移动较小的指针。
334
Array
低频
Given an unsorted array return whether an increasing subsequence
of length 3 exists or not in the array.
Note: Your algorithm should run in O(n) time complexity and O(1) space complexity.
Example 1:
Input:[1,2,3,4,5]
Output: true
找长度大于等于3的递增子序列。刚开始尝试用双指针各种不过,然后换了个思路
就是一个数一个数的找,用2变量存第1,2个数,遍历过程中发现比其中一个小就更新那个,
然后继续找,这样如果有比当前第一个数小的数出现总会先
更新第一个数,然后才是第二个数,最后第三个数。
128
Array
hashset
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.
Your algorithm should run in O(n) complexity.
Example:
Input: [100, 4, 200, 1, 3, 2]
Output: 4
求一个数组里面最长的连续数列,返回数列长度。
用hash set可以轻松解决,把所有数都放进set,然后一个个取出来,
从该数开始左右寻找看相邻的数是否在set里面,是的话移除继续寻找下一个,
最后把左右index相减就得到当前的子数列长度,
然后在用一个变量每次跟新下最长子数列长度最后就得到结果。
164
Bucket
超低频
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.
Return 0 if the array contains less than 2 elements.
Example 1:
Input: [3,6,9,1]
Output: 3
Explanation: The sorted form of the array is [1,3,6,9], either
             (3,6) or (6,9) has the maximum difference 3.
这题要求找出一个非排序数组排序后两两相邻数字之间最大到gap。
这题用radix sort把数组排序,然后在找出两两相邻数直接最大差值。
287
Array
中频
Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive),
prove that at least one duplicate number must exist.
Assume that there is only one duplicate number, find the duplicate one.
Example 1:
Input: [1,3,4,2,2]
Output: 2
给定一个长度n+1数组,里面数字从1到n,求找出重复到那个数字。
思路:由于长度和数字是匹配的,所以我们可以用index去定位当前数,
比如nums[0]为3,那么我们就把index 3 的数mark一下,比如变为负数,
如果遍历过程中又来到这个index我们就知道这个数是重复的数了。
都pass了后来发现不让改数组,然后在看别人解法就和找linked list circle ii 类似,
就是设置两个快慢指针,让他们在数组里面根据当前的值去跳到相应的index,
当他们相遇的时候,他们所在的环的起点就是重复的数。
135
Array
G家近期高频
There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these children subjected to the following requirements:
  • Each child must have at least one candy.

  • Children with a higher rating get more candies than their neighbors.

Example 1:
Input: [1,0,2]
Output: 5
题意是给定一个数组代表小孩的评分,然后给小孩发糖,有2个条件,
第一个是每个小孩至少有1颗糖,这个比较简单,初始化一个全为1到数组就好。
第二个是评分比左右高的小孩拿到的糖果比左右高,就是说会分到max(left, left)+1颗糖。
解题思路很容易想到,分两遍遍历数组, 第一遍从头到尾,当当前的raing比前一位高,
那么我们就把当前的candy = candy[i-1]+1, 以保证比小的前一位高,
可以看出来我们只是更新了递增到位置。
第二遍从尾到头,我们反过来更新递增的位置,当遍历到当前rating比前一位高时候,
这里需要更新的就不是candy[i] = candy[i-1] + 1了,因为当前的值可能已经比前一位在加上1大了,因为他是个顶点,所以这里我们取candy[i], candy[i+1]+1其中大的值就好了。
例子,                         [1, 3, 4, 5, 2]
我们创建:       candy= [1, 1, 1, 1, 1]
第一次遍历:candy = [1, 2, 3, 4, 1]
第二次遍历:candy = [1, 2, 3, 4, 1]  
[/i][/i]
回复

使用道具 举报

🔗
 楼主| creazy-lobster 2019-3-10 16:10:56 | 只看该作者
全局:
第十五天,数组类,interval类型,都是高频题

#
名称
Tag& 频率
题目
解题
4
Array
Binary search
超高频
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 complexity should be O(log (m+n)).
You may assume nums1 and nums2 cannot be both empty.
Example 1:
nums1 = [1, 3]
nums2 = [2]

The median is 2.0
找两个排序数组的中位数,中位数就是一个排序数组中位于中间的那个数,如果长度为偶数,
则为中间2个数的平均值。面试时候还是要装一下滴,暴力法先提出来,合并数组,在找中位数,
时间空间复杂度都为O(m+n)。
然后就是O(log(m+n))的解法了,要理解这个二分法的解法,最直观就是用例子,
你总能找到一条线可以把两个数组分成2个部分,2部分数量相差不大于1,
使得左边数组的值都比右边数组的值小。随便举个例子
nums1 = [1, 3, 5, 6, 9]
nums2 = [0, 2, 7, 14]
[1, 3, 5, |  6, 9]
[0, 2,     |  7, 14]
分成2部分使得数量相差不大于1,左边所有值小于右边,中位数就在分界线两边的4个数里面。
这里分2种情况,
1. 两数组总长度是奇数:我们就取分界线左边两数组对应的值的最大值,这里是max(5,2) = 5.
2. 长度为偶数:我们就取分界线左边的最大值和右边的最小值的和的平均值,avg(maxLeft, minleft)
还有解这道题的一些关键点:
  • 我们需要在短一点的数组上做二分法,所以刚开始如果第一个数组较长我们需要换一下位置。

  • 由于我们是在短的数组上做二分partition,那么长数组的partition的位置可以由公式得来

  • partition1 + partition2 = (m+n+1)/2,这样保证了partition左右数量相差不会大于1。

  • 二分的时候需要检测分界线左右4个数,我们用left1, left1代表数组1分界线左右两个数,

  • left2, left2代表数组2的。

  • <1>. left1 < left2 and left2 < left1, 找到分界线,计算中位数

  • <2>. left1 > left2,说明当前短数组的partition太靠右边了,二分往左走

  • <3>. left2 > left1,说明当前短数组的partition太靠左边了,二分往右走

289
Array
Dropbox题
Given a board with m by n cells, each cell has an initial state live (1) or dead (0).
Each cell interacts with its eight neighbors (horizontal, vertical, diagonal) using the following four rules
(taken from the above Wikipedia article):
  • Any live cell with fewer than two live neighbors dies, as if caused by under-population.

  • Any live cell with two or three live neighbors lives on to the next generation.

  • Any live cell with more than three live neighbors dies, as if by over-population..

  • Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.

题目要求in-place转换状态,我们可以看出细胞状态转换的规律
死 ----周围有3个活细胞----》活
     \   其他情况-----》死
活 ----周围有2,或3个活细胞----》活
    \    周围有小于2或大于3个活细胞----》死
要原地置换状态的话我们一个个看,第一种死细胞复活,需要置换状态到1
第二种不用做任何动作。第三种,也不用做动作。第四种需要置换状态到0。
也就是说我们有两种情况需要处理,0→ 1 和 1 → 0,如何更新使得接下来的数能拿到
现在的状态然后结束后又能够转换成下一个状态呢?把0→ 1先置换成3,1 → 0置换成2.
遍历的时候看邻居为1或2就是活细胞。结束之后除2取余数就是结束状态,2%2 = 0,3%2=1





57
Interval
中高频
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).
You may assume that the intervals were initially sorted according to their start times.
Example 1:
Input: intervals = [[1,3],[6,9]], newInterval = [2,5]
Output: [[1,5],[6,9]]
感觉很简单居然写错了,这种题就是典型的思路简单但是edge case很多需要考虑。
主要解法就是先把原数组中左边和右边不相交的子数组分出来存到left,left。
然后检测看如果左右数组加起来如果不是原数组,说明我们在数组中间就有重叠,
然后把我们对比newInterval和相交的interval范围,确定合并后的新interval的start和end。
最后合并left,新interval,left。
56
Interval
超高频
Given 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,3] and [2,6] overlaps, merge them into [1,6].
合并所有有重叠的interval,思路很容易想到,从前往后遍历如果有重叠就合并,
但是前提是要排好序的,所以第一步先按照每个interval的start排序。
第二步,开一个数组用来存合并后的数组,遍历过程中先查看当前start是否和
结果数组最后一个interval的end有重叠, 有的话就合并,然后我们需要看当前interval
的end是否大于结果数组最后一个interval的end,是的话更新,不是说明当前interval
被包含了进去,不做更新。没有重叠之间把当前interval加到结果数组。
252
Interval
中低频
Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei),
determine if a person could attend all meetings.
Example 1:
Input: [[0,30],[5,10],[15,20]]
Output: false
按照每个interval的start时间排序,然后检测前一个end是否大过了
当前interval的start,大了就返回false。
253
Interval
FB,G
超高频
Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei),
find the minimum number of conference rooms required.
Example 1:
Input: [[0, 30],[5, 10],[15, 20]]
Output: 2
同样按照interval的start时间排序,但是这题求最多需要安排多少房间。
这里我们需要一个heap来存会议end时间。遍历过程中,
每次遍历我们会把rooms的计数加1,同时更新最大房间数。
但是在给rooms计数加1之前,我们需要把已经过期的会议end时间
pop出heap,每弹出一个rooms计数减1,这样就保证了每个会议
开始时的最大房间需要数。






回复

使用道具 举报

🔗
 楼主| creazy-lobster 2019-3-12 14:53:34 | 只看该作者
全局:
第十六天,数组类里面的sliding window,还有prefix sum

239
Array
SlidingWindow
近期高频

Given an array nums, there is a sliding window of size k which is moving from
the very left of the array to the very left. You can only see the k numbers in
  the window. Each time the sliding window moves left by one position.
  Return the max sliding window.
Example:
Input: nums = [1,3,-1,-3,5,3,6,7], and k = 3
Output:[3,3,5,5,6,7]
Explanation:

Window position                Max
---------------               -----
[1  3  -1] -3  5  3  6  7       3
1 [3  -1  -3] 5  3  6  7       3
1  3 [-1  -3  5] 3  6  7       5
1  3  -1 [-3  5  3] 6  7       5
1  3  -1  -3 [5  3  6] 7       6
1  3  -1  -3  5 [3  6  7]      7
这题给定一个数组和一个window的长度,窗口从头移动到尾,
要求返回一个数组包含了每个窗口的最大值。这题解法是使用双端队列,
主要思路就是我们把当前窗口最大值放在deque最左边,当窗口要移动的时候就把最左边的值
拿出来当作当前窗口的最大值加入结果中。
从头遍历数组,4个操作:
  • 当deque里面最左边的数超出了window的范围就移除,保证deque里面的数在window里面

  • 如果当前数组的值num大于deuqe最右边的值,就移除掉deque右边的值直到deque最右边大于等于当前num或者为空。这一步保证了deque最左边的值为当前窗口最大值。

  • 然后把当前值加入deque

  • 把deque最左边当前窗口最大值加到结果去


例子: [1, 3, -1, -3, 5, 3, 6, 7]
i = 0    dq = [1]             result = []      dq为空,跳过第1,2步  
i = 1    dq = [3]             result = []     3大于1,移除1
i = 2    dq = [3, -1]        result = [3]     -1不大于dq最右边数, 当窗口长度等于k时开始加到结果
i = 3   dq = [3, -1, -3]    result = [3, 3]     -3不大于dq最右边数, 加当前最大值3
i = 4   dq = [5]               result = [3,3,5]     dq最左边3超出window移除,dq从右到左最右边数比5小
i = 5   dq = [5, 3]           result = [3,3,5,5]     5在当前window且3不大于dq最右边
i = 6   dq = [6]               result = [3,3,5,5,6]     6比dq从右到左所以数都大
i = 7   dq = [7]               result = [3,3,5,5,6,7]     7比dq从右到左所以数都大
有一点要注意就是这里演示方便用的值,其实我们要存index到dq,
才好检查他是否在当前窗口里面。
295
Array
heap
近期高频
Median is the middle value in an ordered integer list. If the size of the list is even,  there is no middle value.
So the median is the mean of the two middle value.
For example,
[2,3,4], the median is 3
[2,3], the median is (2 + 3) / 2 = 2.5
Design a data structure that supports the following two operations:
  • void addNum(int num) - Add a integer number from the data stream to the data structure.

  • double findMedian() - Return the median of all elements so far.


Example:
addNum(1)
addNum(2)
findMedian() -> 1.5
addNum(3)
findMedian() -> 2
这题要设计寻找当前数据的中位数的方法,
一个用来往里面加数,一个用来返回当前中位数。
思路其实挺简单,就是用两个堆,分别用来存小的和大的部分,
然后返回中位数的时候只需检测两个堆长度是否相等,
如果相等就返回小的部分的最大值和大的部分最小值的平均值,
不相等就返回大的部分的最小值。实现的话取决于语言,java可以维护最大堆和最小堆,
python默认最小堆要维护一个最大堆就把数取负放进去。
53
Array
DP
prefix sum
高频
Given an integer array nums, find the contiguous subarray
which has the largest sum and return its sum.
Example:
Input: [-2,1,-3,4,-1,2,1,-5,4],
Output: 6
Explanation: [4,-1,2,1] has the largest sum = 6.
从一个数组中找子数组使其组成的和最大, 这题首先需要算当前子数组的和,
就是说要控制子数组的window,如何控制呢?
遍历过程就是窗口右边界, 关键在何时移动左边界,
每一次右指针移动我们就比较当前window里面数的和与当前数的大小,当前数大,
说明前面window子数组和还没有当前的大爷大,所以窗口左指针移动到你大爷这,
然后继续看下一个。
这题使用一个一位数组,dp 表示i这个位置子数组能取到最大的和。优化一下我们可以不用数组达到O(1) space, 稍微看一下知道我们只需要记录前一位子数组和就好了。
325
Array
prefix sum
HashTable
低频
Given an array nums and a target value k,
find the maximum length of a subarray that sums to k.
If there isn't one, return 0 instead.
Input: nums = [1, -1, 5, -2, 3], k = 3
Output: 4
Explanation: The subarray [1, -1, 5, -2] sums to 3 and is the longest.
和two sum类似,运用prefix sum的思路来确定子数组和。公式如下,
preSum[0:i] = preSum[i:n] - k
例子:       [1, -1, 5, -2, 3]   k=3
prefixsum [1, 0,  5,  3,  6]
map     [1:0, 0:1, 5:2, 3:3, 6:4]
index为3时候,取prefix sum为3-3=0的index截取子数组,更新长度。
209
Array
sliding window
中频
Given an array of n positive integers and a positive integer s,
find the minimal length of a contiguous subarray of which the sum ≥ s.
If there isn't one, return 0 instead.
Example:
Input: s = 7, nums = [2,3,1,2,4,3]
Output: 2
Explanation: the subarray [4,3] has the minimal length under the problem constraint.
求最短的子数组,其和大于等于给定s的值。然后还是sliding window和prefix sum。
解体思路就是维护一个窗口,当前窗口和小于s时候,移动右指针;
当窗口和大于等于s时候,先跟新最短长度,然后移动左窗口直到小于s。
238
Array
超高频
Given an array nums of n integers where n > 1,  return an array output such
that output is equal to the product of all the elements of nums except nums[i].
Example:
Input:  [1,2,3,4]
Output: [24,12,8,6]
Note: Please solve it without division and in O([i]n
).
[/i][/i]
要求数组中每个数除开自己的所有数的乘积,不让用除法,所以得另外想办法。
思路还是从prefix product开始,我们可以看出这样可以得到每个数左边乘积的一个数组,
同理我们可以算出每个数右边数的乘积,然后把两个乘积乘起来就是除开自己的所有数乘积。
nums           #1 , 2, 3, 4
左边乘积      #1 , 1, 2, 6

nums           #1  , 2,   3,  4
右边乘积      #24, 12, 4,  1
152
Array, prefixsum
中频
Given an integer array nums, find the contiguous subarray within an array
(containing at least one number) which has the largest product.
Example 1:
Input: [2,3,-2,4]
Output: 6
Explanation: [2,3] has the largest product 6.
要求找出子数组的最大乘积,这题有负数。
这题思路和上题类似,也是算出左右prefix product,我们可以看出最大值为6,
当然解体时只需一个变量保存当前最大值就好了,不用开数组。
nums      #2,      3,      -2,        4
左边乘积 #2,      6,      -24,   -96
右边乘积 #-96,  -24,   -8       ,4
这题还有一个trick,就是0出现的时候,你后面子数组乘积就全为0了,所以我们遇见0了以后要从新计算乘积。
228
Array
Capital one高频
Given a sorted integer array without duplicates, return the summary of its ranges.
Example 1:
Input:  [0,1,2,4,5,7]
Output: ["0->2","4->5","7"]
Explanation: 0,1,2 form a continuous range; 4,5 form a continuous range.
在排序数组里面找出连续的数字的起始和终止位置,比较简单,
遍历数组检测是否连续,连续就继续,不连续就把当前窗口左右边界加入结果,
移动窗口到当前位置。
163
Array
G家中低频
Given a sorted integer array nums, where the range of elements are
in the inclusive range[lower,upper], return its missing ranges.
Input: nums = [0, 1, 3, 50, 75], lower = 0 and upper = 99,
Output: ["2", "4->49", "51->74", "76->99"]
和上面一题差不多,用个pre变量记录当前range的起始,
需要检测pre和当前值的距离,一个数和大于1个数调整输出格式就好。



回复

使用道具 举报

🔗
 楼主| creazy-lobster 2019-3-15 15:57:14 | 只看该作者
全局:
第17天打卡,中间忙项目又耽搁了2天做了几道数组和字符的题明后天整理上来,今天写了几道backtracking
#
名称
Tag& 频率
题目
解题
78
Backtracking
FLAGU中频
Given a set of distinct integers, nums, return all possible subsets
(the power set).
Note: The solution set must not contain duplicate subsets.
Input: n = [1, 2]
Output:
[
  [], [1], [2], [1,2]
]
Backtracking热身题,模板就不多说了,寻找subsets。
首先需要定义subset长度变量来寻找不同长度的subsets。
需要一个变量来track当前到哪个index。
90
Backtracking
AF低频
Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set).
上一题follow up,现在有重复数字了,但是我们不能把重复的
subset加入结果中。只需要在上题代码中加一行判断,
就是在把subset加入最终结果之前判断是否已经有一样的subset
在结果中,有的话就pass。
77
Backtracking
FAMG低频
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
Input: n = 4, k = 2
Output:
[
  [2,4], [3,4],[2,3],[1,2],[1,3],[1,4],
]
给定一个n代表数字1到n,k代表组合长度,要求所有的组合。
由于给定组合长度我们不需要像上一题枚举长度了。

39
Backtracking
Airbnb, Amazon
Linkedin, Uber
Input: candidates = [2,3,6,7], target = 7,
A solution set is:
[
  [7],
  [2,2,3]
]
给定一堆数字,和一个target,要求找出组合加起来等于target。
没有重复但数字可以多次使用,所以我们写backtracking的时候就不
往上加index了,比如例子已经加了[2,2], 在往里面加2会超出,
超出返回回来继续加3得到子数组和等于7,把子数组加入结果。
40
Backtracking
MUL低频
Given a collection of candidate numbers (candidates) and a target number (target),
find all unique combinations in candidates where the candidate
numbers sums to target.
Each number in candidates may only be used once in the combination.
变形题,现在每个数字只能使用一次, 但也会有重复数字了。
所以这个backtracking就要往上加index了,但这只能满足
每个数字使用一次。任然会产生重复的组合。
这个我们只需要在加入结果时判断该组合是否已经在结果中就行。
和subsetII一样

216
Backtracking
MS低频
Find all possible combinations of k numbers that add up to a number n,
given that only numbers from 1 to 9 can be used and each combination should be a unique set of numbers.
Note:
  • All numbers will be positive integers.

  • The solution set must not contain duplicate combinations.

让你从1-9中选k个数组成组合,找出和为n的组合。
和上面差不多,backtracking从1到9,当和为target加入结果。




回复

使用道具 举报

🔗
laurel_123 2019-3-15 17:50:06 | 只看该作者
全局:
楼主总结的很详细呀。加油!

评分

参与人数 1大米 +3 收起 理由
creazy-lobster + 3 给你点个赞!

查看全部评分

回复

使用道具 举报

🔗
 楼主| creazy-lobster 2019-3-16 14:49:27 | 只看该作者
全局:
第18天打卡,继续backtracking,排列组合类。

#
名称
Tag& 频率
题目
解题
254
Backtracking
Linkedin中频
Write a function that takes an integer n and return all possible combinations of its factors.
Input: 12
Output:
[
  [2, 6],
  [2, 2, 3],
  [3, 4]
]
给定一个数n,要求返回其所有factor的组合。
用 backtracking做,从2开始枚举所有factor,如果能被n整除,
我们就把他加入subset,终止条件为当n为1的时候,找到一个组合。
搜索过程如下图:
                   12
            /(2)   |(3)    \(6)
          6         4           2
        /(2)         \(4)      \(2)
      3                 1           1
       \(3)
        1
46
Backtracking
FLAG+others中高频
Input: [1,2,3]
Output:
[
  [1,2,3],
  [1,3,2],
  [2,1,3],
  [2,3,1],
  [3,1,2],
  [3,2,1]
]
给一组不重复的数字,列出所有排列。
和上面组合不同的地方就是同样组合不同
顺序的排列会被选取,首先我们不用对数组排序了。
第二我们不需要变量记录当前index,因为每个数字开头都会
形成一组排列,我们只需要在加入subset的时候检测该数是否已经
在subset就可以避免重复加入, 这个过程也叫剪枝。
这类题都可以用图表示容易理解,过程如下图:
                                       [1, 2, 3]
                  /                       |                          \
               [1]                       [2]                          [3]  
              /  \                    /     \                        / \
          [1,2]   [1,3]         [2,1]   [2,3]            [3,1]   [3,2]
          /         \                /           \               /\         /\
      [1,2,3]     [1,3,2]   [2,1,3]     [2,3,1]   [3,1,2]    [3,2,1]
  47
Backtracking
FLG中频
Given a collection of numbers that might contain duplicates, return all possible unique permutations.
Input: [1,1,2]
Output:
[
  [1,1,2],
  [1,2,1],
  [2,1,1]
]
现在数组里面有重复数字出现,要求所有排列。
由于存在重复数字,我们检测当前数是否已经在subset就行不通了。
所以解决这个问题的方法就是建立一个长度n的数组,初始化false。
当我们把一个数加入subset后我们就mark为true,可以帮我们区别
相同数字哪一个用过。
然后我们发现光这样结果还是不对,还会有重复排列出现。
这里我们就需要剪枝了,比如下图:
                                    [1, 1, 2]
                  /                       |                          \
               [1]                       [1]                          [2]  
              /  \                    /     \                        / \
          [1,1]   [1,2]         [1,1]   [1,2]            [2,1]   [2,1]
我们能看出同样的数字生成的排列是一样的,所以我们需要剪掉,方法就是把当前数字后一样的数字跳过去,当然前提我们需要把数组排序
31
Backtracking
String
FG高频
MAU中频
Implement next permutation, which rearranges numbers into the
lexicographically next greater permutation of numbers.
If such arrangement is not possible, it must rearrange it
as the lowest possible order (ie, sorted in ascending order).
The replacement must be in-place and use only constant extra memory.
1,2,3 → 1,3,2
3,2,1 → 1,2,3
1,1,5 → 1,5,1

这题考的可是数学理论基础,看看要是被问到不会就gg。
https://en.wikipedia.org/wiki/Permutation#Generation_in_lexicographic_order
简单说过程分3步走:
  • 从后往前遍历找两个相邻数使得,prev < cur

  • 从后往前找一个数num,使得prev < num, 交换之

  • 把cur后的数组反转排序

比如:     4 ,5 ,7, 6 ,3 ,1
  • 找到cur = 7, prev = 5

  • num = 6,  和prev交换得到4, 6, 7, 5, 3, 1

  • 反转cur后的数,得到4, 6, 1, 3, 5, 7

60
Backtracking
String
低频
By listing and labeling all of the permutations in order, we get the following sequence for n = 3:
  • "123"

  • "132"

  • "213"

  • "231"

  • "312"

  • "321"

Given n and k, return the kth permutation sequence.
要求n个数第k个排列,直接dfs搜索所有会超时。
我们知道n个数有n!排列,当n = 3, 3! = 3*2 = 6。
然后如下可看出,每个数开头+剩下的数排列。
1{ 2!}
2{ 2!}
3{ 2!}
不难看出如果找第3个我们去2里面找,第5个去3里面找。
以此类推就可以快速找出排列。
290
String
Hashtable
Given a pattern and a string str, find if str follows the same pattern.
Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str.
Example 1:
Input: pattern = "abba", str = "dog cat cat dog"
Output: true
用个map建立起字符到word的映射,主要检查下面2种情况:
  • 如果字符已经在map里面,如果map的word和当前word不一样,返回false。一对多错误

  • 如果字符不在map里面,在检查当前word是否在map的value里面,在的话返回false。多对一错误。






291
Backtracking
FB, Airbnb, Dropbox低频
Given a pattern and a string str, find if str follows the same pattern.
Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty substring in str.
Example 1:
Input: pattern = "abab", str = "redblueredblue"
Output: true
用backtracking来枚举所有匹配,比如最开始用’a’去匹配’r’。
‘b’去匹配’e’, 然后’a’遇到’d’和之前的不March,就退回去用
‘b’去匹配’ed’,以此类推。



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表