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

[其他] 缺大米的请参加这个刷题/Mock interview活动

     关闭
🔗
江小晚 2020-6-29 10:23:41 | 只看该作者
全局:
打卡第19天; 694. Number of Distinct Islands; 957. Prison Cells After N Days; 953. Verifying an Alien Dictionary; 311. Sparse Matrix Multiplication。 截图放在截图

评分

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

查看全部评分

回复

使用道具 举报

🔗
371300036 2020-6-29 10:12:52 | 只看该作者
全局:
今日刷的题,array系列

评分

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

查看全部评分

回复

使用道具 举报

🔗
simba2019 2020-6-29 09:48:14 | 只看该作者
全局:
Day 19打卡:7题

Screen Shot 2020-06-28 at 6.47.25 PM.png (423.71 KB, 下载次数: 0)

Screen Shot 2020-06-28 at 6.47.25 PM.png

评分

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

查看全部评分

回复

使用道具 举报

🔗
DL 2020-6-29 09:39:42 | 只看该作者
全局:
打卡第27天, 刷了3道题

86. Partition List
用两个linked list,一个指向小于x的nodes,另一个指向大于或等于x的nodes,最后再对接。

141. Linked List Cycle
用两个指针,一个快,一个慢,如果快的指向null,则no cycle,否则总会遇到

142. Linked List Cycle II
还是两个指针,一个快,一个慢,相遇后,快指针变成慢的从相遇出继续往前走,开始的慢指针从起点开始走,再次相遇的地方就是cycle开始的地方。

image.png (107.82 KB, 下载次数: 0)

image.png
回复

使用道具 举报

🔗
yaozheng 2020-6-29 09:07:24 | 只看该作者
全局:
Jun 28 打卡第28天,6道题
1498. Number of Subsequences That Satisfy the Given Sum Condition, 之前一直想着从后往前遍历,其实从前往后遍历很容易,并利用了two sum,双指针的思想;
1499. Max Value of Equation, sliding window, 可以转化为(yi-xi)+(yj+xj),pq;单调栈也可以解决;注意单调性的维护pollLast();
1156. Swap For Longest Repeated Character Substring, 解法sliding window,维护一个map记录每个字符的个数,最后结果不可能超过map里的value。代码有点messy=-=
424. Longest Repeating Character Replacement, 与1156类似,维护一个maxCount表示不用替换的char,maxLen是最终结果,sliding window,中间结果不一定符合题目要求,但是最终只需要更长的来替换它;
322. Reconstruct Itinerary, 注意如果需要得到某个res立即返回,可以添加boolean返回值,然后dfs嵌套dfs时, if(dfs(…)) return true; 这样可以得到第一个满足条件的值;题解中还有一种简便的方法,pq + dfs(“JFK”, map, res)。

回复

使用道具 举报

🔗
edsot 2020-6-29 08:13:44 | 只看该作者
全局:
6.28 day29452 medium 题目看着复杂但本质还是job scheduling
463 easy 遍历即可,dfs没有显著优势
480 hard 用两个priorityqueue即可

Screen Shot 2020-06-28 at 7.08.39 PM.png (108.89 KB, 下载次数: 0)

Screen Shot 2020-06-28 at 7.08.39 PM.png

评分

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

查看全部评分

回复

使用道具 举报

🔗
joezie 2020-6-29 08:12:19 | 只看该作者
全局:
#第十九次打卡 今天刷了五道题,开心的是一道hard很顺利地就做出来了嘻嘻,还有的话就是学到了在一些特定的题目里用O(1)空间的方法来对二叉树进行逐行的BFS遍历



回复

使用道具 举报

🔗
kfan4372 2020-6-29 07:29:53 | 只看该作者
全局:
第九天,六题

6.29.PNG (38.89 KB, 下载次数: 0)

6.29.PNG

评分

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

查看全部评分

回复

使用道具 举报

🔗
boxzme 2020-6-29 06:27:46 | 只看该作者
全局:
打卡第四天,昨天鸡血打太多,今天直接蔫了

Screen Shot 2020-06-28 at 6.26.48 PM.png (177.84 KB, 下载次数: 0)

Screen Shot 2020-06-28 at 6.26.48 PM.png

评分

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

查看全部评分

回复

使用道具 举报

🔗
Chianti13 2020-6-29 05:19:05 | 只看该作者
全局:
本帖最后由 Chianti13 于 2020-6-29 05:40 编辑

啊啊啊才看到有这么好的活动!已经自己刷了一个多月了 先和lz说声抱歉 时间早一点的记录我可能翻不到或是记录的有点模糊了 在leetcode上开了好几个session太乱了…先把这个月尽力找到的记录发出来吧 先感谢楼主加米5555~我真是太缺米了

一个多月几乎每天都有在leetcode上刷database和algorithms(偶尔因为final没刷)。下面是刷题记录:
6.1: db 6道: Shortest Distance in a Plane, Investments in 2016, Count Student Number in Departments, Get Highest Answer Rate Question, Winning Candidate, Managers with at Least 5 Direct Reports

6.2: algo 2道: House Robber, Best Time to Buy and Sell Stock
       db 3道: Human Traffic of Stadium, Trips and Users, Department Top Three Salaries, Number of Transactions per Visit

6.3: db 4道: Market Analysis II, Students Report By Geography, Find Cumulative Salary of an Employee, Report Contiguous Dates

6.5: algo 3道: Maximum Subarray, Range Sum Query - Immutable, House Robber II
       db 4道: User Purchase Platform, Find the Quiet Students in All Exams, Median Employee Salary, Total Sales Amount by Year

6.7: db 5道: Get the Second Most Recent Activity, Tournament Winners, Game Play Analysis V, Average Salary: Departments VS Company, Find Median Given Frequency of Numbers
       algo 3道: Coin Change, Maximum Product Subarray,Longest Increasing Subsequence

6.8 db 6道: Calculate Salaries, Combine Two Tables, Delete Duplicate Emails, Customers Who Never Order, Employees Earning More Than Their Managers, Second Highest Salary
      algo 1道: Longest Palindromic Substring,

6.11 algo 4道: Palindromic Substrings, Number of Longest Increasing Subsequence, Partition Equal Subset Sum, Partition to K Equal Sum Subsets

6.12 algo 1道: Best Time to Buy and Sell Stock with Cooldown 试了两三种解法

6.13 algo 5道: Middle of the Linked List, Palindrome Linked List, Remove Linked List Elements, Remove Duplicates from Sorted List, Linked List Cycle II

6.14 algo 4道: Add Two Numbers, Remove Nth Node From End of List, Sort List, Reorder List

6.16 algo 3道: Clone Graph, Number of Islands, Graph Valid Tree

6.17 algo 3道: Graph Valid Tree, Number of Connected Components in an Undirected Graph, Reverse Linked List
        db 2道: New Users Daily Count, Project Employees III,

6.18 algo 5道: Reverse Linked List II, Rotate List, Swap Nodes in Pairs, Odd Even Linked List, Reverse Nodes in k-Group
        db 8道: Product Sales Analysis III, Shortest Distance in a Plane, Investments in 2016, Count Student Number in Departments, Get Highest Answer Rate Question, Winning Candidate, Department Top Three Salaries, Trips and Users

6.19 algo 4道: Find K Pairs with Smallest Sums, Merge k Sorted Lists, Merge Two Sorted Lists, Kth Smallest Element in a Sorted Matrix
        db 6道: Human Traffic of Stadium, Number of Transactions per Visit, Median Employee Salary, Find Cumulative Salary of an Employee, User Purchase Platform, Market Analysis II

6.20 algo 2道: Smallest Range Covering Elements from K Lists, Meeting Rooms,
        db 5道: Report Contiguous Dates, Students Report By Geography, Find the Quiet Students in All Exams, Sales by Day of the Week, Total Sales Amount by Year

6.21 db 6道: Average Salary: Departments VS Company, Get the Second Most Recent Activity, Tournament Winners, Game Play Analysis V, Find Median Given Frequency of Numbers, Group Sold Products By The Date
       algo 6道: Non-overlapping Intervals, Meeting Rooms II, Task Scheduler, Minimum Number of Arrows to Burst Balloons, Insert Interval, Employee Free Time

6.22 algo 6道: Binary Search, Longest Palindromic Subsequence, Gas Station, Find Smallest Letter Greater Than Target, Peak Index in a Mountain Array, Find Minimum in Rotated Sorted Array
        db 2道: Trips and Users, Exchange Seats

6.23 algo 3道: Find Peak Element, Search in Rotated Sorted Array, Search in Rotated Sorted Array II

6.24 algo 4道: Search a 2D Matrix, Search a 2D Matrix II, Find K Closest Elements, Count of Range Sum

6.26 algo 4道: Minimum Size Subarray Sum, Fruit Into Baskets, Permutation in String, Longest Repeating Character Replacement

6.27 algo 3道: Sliding Window Maximum, Longest Substring Without Repeating Characters, Minimum Window Substring

以下是一些记录截屏~

关于刷题方面,因为我也是第一次刷……可能没太多的经验建议。
database我是从easy到hard做,这个一开始刷可能会有点慢,等刷到一定量的题就有感觉了会越刷越快。
algorithms我是根据不同类别来刷的,比如我的线路是:Arrays→DFS→Backtracking→Dynamic Programming→BFS→Graph→Fast & Slow Pointers→Sliding Window... 这样能更快的熟悉和更好的把握不同类型的题,东一道西一道很容易把自己的思路打乱
更多图片 小图 大图
组图打开中,请稍候......

评分

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

查看全部评分

回复

使用道具 举报

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

本版积分规则

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