Medium Collection Hard Collection to help you master Data Structure & Algorithms and improve your coding skills. Just like any other skills, coding interview is one area where you can greatly improve withdeliberate practice. Most of the classic interview questions have multiple solution approaches. Fo...
如果只算Medium和Hard的话,其实只有四五百道的水平。但我还是比较推荐上来先刷刷Easy建立一下自信心,并且培养起刷题的习惯。一上来就刷Medium甚至Hard的话,大多数没有基础的人都会被打击到的,甚至可能你殚精竭虑想了一整天提交了十几次,最后终于通过了,结果不是最优的算法,才击败20%的人。。。但刷Easy的话效...
Top ‘K’ Frequent Numbers (medium) Frequency Sort (medium) Kth Largest Number in a Stream (medium) ‘K’ Closest Numbers (medium) Maximum Distinct Elements (medium) Sum of Elements (medium) Rearrange String (hard) 13. Pattern: K-way merge,多路归并 K路归并能帮咱们解决那些涉及到多组排好序...
LeetCode Top Interview Questions 29. Divide Two Integers (Java版; Medium) 题目描述 Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Return the quotient after dividing dividend by divisor. The integer division should truncate toward z...
LeetCode Top Interview Questions 116. Populating Next Right Pointers in Each Node (Java版; Medium) 题目描述 You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following definition: ...
LeetCode Top Interview Questions LeetCode Top Interview Questions https://leetcode.com/problemset/top-interview-questions/
下面我们就来看看 Grokking the Coding Interview: Patterns for Coding Questions 的分类及每个类型的经典题目: 1. Pattern: Sliding window,滑动窗口类型 经典题目: Maximum Sum Subarray of Size K (easy) Smallest Subarray with a given sum (easy) Longest Substring with K Distinct Characters (medium) ...
15 3 Sum C++ Python O(n^2) O(1) Medium Two Pointers 16 3 Sum Closest C++ Python O(n^2) O(1) Medium Two Pointers 18 4 Sum C++ Python O(n^3) O(1) Medium Two Pointers 26 Remove Duplicates from Sorted Array C++ Python O(n) O(1) Easy Two Pointers 27 Remove Element C++ Pytho...
This repository contains the solutions and explanations to the algorithm problems on LeetCode. Only medium or above are included. All are written in C++/Python and implemented by myself. The problems attempted multiple times are labelled with hyperlinks.
0105 Construct Binary Tree from Preorder and Inorder Traversal Go 48.8% Medium 0106 Construct Binary Tree from Inorder and Postorder Traversal Go 47.1% Medium 0107 Binary Tree Level Order Traversal II Go 53.5% Easy 0108 Convert Sorted Array to Binary Search Tree Go 57.9% Easy 0109 Conver...