因为在开始写这个博客之前,已经刷了100题了,所以现在还是有很多题目没有加进来,为了方便查找哪些没加进来,先列一个表可以比较清楚的查看,也方便给大家查找。如果有哪些题目的链接有错误,请大家留言和谅解,链多了会眼花。 # Title Category Difficulty 1528 Shuffle S
Grokking the Coding Interview: Patterns for Coding Questions.这门课程是一个总结提高的课程,它把算法面试的遇到的题型分成了各种模式,每类题各个击破。比如最经典的sliding window模式,Two pointers模式,快慢指针模式,合并intervals模式,cyclic sort模式,in-place翻转链表模式,树上的BFS,树上的DFS,双Heaps模式,subse...
4 Median of Two Sorted Arrays 17.40% Hard 3 Longest Substring Without Repeating Characters 20.60% Medium 2 Add Two Numbers 21.10% Medium 1 Two Sum 17.70% Medium WeChat Official Subscription Account Welcome to follow my subscription account on Wechat, I will update the newest updated problem solu...
To sort an array/Collections: Arrays.sort(array, (a,b) -> a[0] - b[0]);//ascending sorting 2d array based on first index Arrays.sort(array,(a,b)-> {if(a[1]==b[1])return0;if(a[1]<b[1])return-1;return1; });//to avoid overflow //Sorting map keysMap<Integer,Integer>...
2140.Solving-Questions-With-Brainpower (H) 2189.Number-of-Ways-to-Build-House-of-Cards (H-) 2218.Maximum-Value-of-K-Coins-From-Piles (H-) 2222.Number-of-Ways-to-Select-Buildings (M+) 2312.Selling-Pieces-of-Wood (M+) 2338.Count-the-Number-of-Ideal-Arrays (H) 2431.Maximize-Total-...
15) How do you create an event with a probability of 1/3 using an unbiased coin? Do two tosses then TT HH TH HT 如果是TT就重新丢一次,我们选定HH。 等一系列 coin toss questions; Make a fair coin from a biased coin 考虑(0,1) and (1,0) 这两种等可能的情况...
LeetCode Top Interview Questions LeetCode Top Interview Questions https://leetcode.com/problemset/top-interview-questions/
这篇文章是关于LeetCode Top 100 Liked Questions 的 专栏记录,其中部分题目可能包括解题思路和多种优化解法。我把自己的思路都记录在这里,如果你看见了,请记得点个赞吧,蟹蟹【手动笑脸】。 1、Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific ...
Problem solving. From the very beginning, you should put the conditions of the problem on the shelves and ask clarifying questions and find out what edge cases can be. As you write code, you should divide tasks into subtasks, if necessary, do not write chaotically and rewrite everything, ...
(OPTIONAL)Sliding Window TechniqueSliding Window ImplementationArrays and Strings Interview QuestionsExplanation - Move Zeroes - Easy #283Code - Move Zeroes - Easy #283Explanation - Boats to Save People - Medium #881Code - Boats to Save People - Medium #881Explanation - Valid Mountain Array - ...