Most common solutions to problems from interviews of high-tier companies.
Solutions to LeetCode & HackerRank problems.
The repository is constantly updated when Python or SQL solution to the problem found at LeetCode (primarily) or HackerRank is solved.
The solutions to LeetCode problems are posted at the discussion sections in each solved problem folder.
If the solved Leetcode problem is one of the problems asked by high-tier companies like Adobe,
Airbnb, Amazon, Apple, Bloomberg, DE Shaw, Goldman Sachs,
Google with Google Top, LinkedIn, Meta, Microsoft,
Netflix, Reddit, Spotify, Tesla, TikTok, Twitter or Uber
then that solution of specific company is added to the company's section as my GitHub solution found through contents.
Otherwise it is added here as the solved problem is not glued to any of the high-tier companies' section; it is just a random problem that was solved.
The progress of my LeetCode account regarding these solutions with additional information on them can be found by looking at my LeetCode profile.
The Leetcode solutions of Python are found here while HackerRank solutions of Python are found here. Each problem folder has the description of the problem found through pressing the link in README at the respective folder or if it is provided for the particular high-tier company found through contents. By pressing on that company you will be redirected to the problem description (1st column) followed by the solution implemented in PyCharm (2nd column).
Currently, doing Python problems of LeetCode. HackerRank problems were finished on May and from 28th of May 2022 am working on solving at least one Python problem from LeetCode daily. The solution is put at the respective LeetCode folder and added to the list of a high-tier company where it is a common interview question to be asked to solve. The problems for a particular company is seen through contents list.
SQL solutions of problems at HackerRank & LeetCode will come in Fall while they will be updated here for HackerRank and here for LeetCode.
- Table of contents
- Preparation for Interiews
- Must Do Problems
- Adobe
- Airbnb
- Amazon
- Apple
- Bloomberg
- DE Shaw
- Goldman Sachs
- Google Top
- Meta
- Microsoft
- Netflix
- Spotify
- Tesla
- TikTok
- Uber
- Others
To prepare for a MAANG interview or a MAANG-level company interview as well as land a job there I highly recommend solving as many problems below as possible and doing one or all of these:
- Joining Hackpack community
- Solving Top LeetCode Problems
- Honing Python Skills
- Looking at possible Multiple Choice Questions
No. | Questions | Solution in PyCharm | Time Complexity | Space Complexity |
---|---|---|---|---|
1 | Department Top Three Salaries | Department Top Three Salaries | ||
2 | Valid Parentheses | Valid Parentheses | O(n) | O(n) |
3 | Best Time to Buy and Sell Stock | Best Time to Buy and Sell Stock | O(n) | O(1) |
4 | Merge Intervals | Merge Intervals | O(n log n) | O(n) |
5 | Group Anagrams | Group Anagrams | O(n) | O(n) |
6 | Top K Frequent Elements | Top K Frequent Elements | O(n) | O(n) |
No. | Questions | Solution in PyCharm | Time Complexity | Space Complexity |
---|---|---|---|---|
1 | Combination Sum | Combination Sum | O(2^n) | O(n) |
2 | Combination Sum II | Combination Sum II | ||
3 | Number of Islands | Number of Islands | O(n^2) | O(n^2) |
4 | Merge Sorted Array | Merge Sorted Array | O(n) | O(n) |
5 | Subsets | Subsets | O(2^n) | O(2^n) |
6 | Insert Interval | Insert Interval | O(n) | O(n) |
7 | Daily Temperatures | Daily Temperatures | ||
8 | Merge Intervals | Merge Intervals | O(n log n) | O(n) |
9 | Best Time to Buy and Sell Stock | Best Time to Buy and Sell Stock | O(n) | O(1) |
10 | Basic Calculator | Basic Calculator | ||
11 | Lowest Common Ancestor of a Binary Tree | Lowest Common Ancestor of a Binary Tree | O(n) | O(1) |
12 | Lowest Common Ancestor of a Binary Search Tree | Lowest Common Ancestor of a Binary Search Tree | O(n) | O(1) |
13 | Game of Life | Game of Life |
No. | Questions | Solution in PyCharm | Time Complexity | Space Complexity |
---|---|---|---|---|
1 | Mirror Reflection | Mirror Reflection | O(n^2) | O(1) |