This repo contains around 700 (600 Leetcode.com and 100 Algoexpert.io) problems in total, with solutions using Swift and Python
This repo contains my solutions to algorithmic problems in leetcode.com and algoexpert.io written in Swift and Python.
Here is my leetcode profile
And my Algoexpert.io certificate of completion
About • Topics • Tips • LeetCode.com • AlgoExpert.io • References
I have solved quite a number of problems from several topics. See the below table for further details.
- Binary Search
- Binary Search Tree
- Binary Tree(Segment Tree)
- N-aray Tree(Trie, Binary Indexed Tree)
- Graph(Dijkstra, Union Find, Kruskal, Prim's, Minimum Spanning Tree, Topological Ordering...etc)
- Stack
- Queue
- Array
- Sorting
- Hash Table
- Heap
- Linked list
- Bit Operation
- Dynamic programming
- Backtracking(Permutations & Combinations & Subsets...etc)
- Math
- and more...
- Leetcode
- Algoexpert.io
- Glassdoor
- Interviews
- ...
- Coding Interview Patterns
- Coding Interview Gym
- iOS Interview Gym
- Behavioural Interview Gym
- System Design Interview Gym
- Object Oriented Design Interview Gym
- Check this Golden post first.
- Whenever you solve a new question with some new techniques/algorithms, try to solve atleast 2 similar problem in a row. This way, your understanding to the new techniques/algorithms will be better.
- Solve all leetcode cards
- ...
Leetcode problems with solutions and tutorials/videos
2. String
Leetcode problems with solutions and tutorials/videos
3. Linked List
Leetcode problems with solutions and tutorials/videos
4. Stack, Queue
Leetcode problems with solutions and tutorials/videos
5. Heaps
Leetcode problems with solutions and tutorials/videos
Leetcode problems with solutions and tutorials/videos
7. Binary Tree
Leetcode problems with solutions and tutorials/videos
Check this [golden](https://tinyurl.com/ujopecz) post.
Leetcode problems with solutions and tutorials/videos
9. N-Ary Tree
Leetcode problems with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | 589. N-ary Tree Preorder Traversal | Python | |||
02 | 590. N-ary Tree Postorder Traversal | Python | |||
03 | 429. N-ary Tree Level Order Traversal | Python | |||
04 | 559. Maximum Depth of N-ary Tree | Python | |||
05 | 431. Encode N-ary Tree to Binary Tree | Python | Explanation | ||
06 | 428. Serialize and Deserialize N-ary Tree | Python | Art 1, Official | Hard | Very important |
Leetcode problems with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | 315. Count of Smaller Numbers After Self | Python | Article 1, Article 2, Vid 1, Vid 2 | Hard (Very) | 📌 Very hard and important. First learn BIT, ST, AVL-Tree and Red-Black Tree then try again |
11. Tries
Leetcode problems with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | 208. Implement Trie (Prefix Tree) | Python | |||
02 | 211. Add and Search Word. Data structure design | Python | Video 01, Video 02 | ||
03 | 642. Design Search Autocomplete System | Python | Article 01, Video 01 | Hard | --- |
04 | 472. Concatenated Words | Python | Art 01, Art 02 | Hard | Very important |
05 | 588. Design In-Memory File System | Python | --- | Hard | --- |
06 | 212. Word Search II | Python, Swift | Art 1 | Hard | --- |
07 | 1233. Remove Sub-Folders from the Filesystem | Python, Swift | Art 1 | Medium | Didn't think of it as a trie. Good problem |
BFS, DFS, Dijkstra, Floyd–Warshall, Bellman-Ford, Kruskal, Prim's, Minimum Spanning Tree, Topological Ordering, Union Find.
Follow this golden rule to approach any graph problem.
Leetcode problems with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | 207. Course Schedule | Python | educative.io | Medium | 📌 Very Important. Check again. BFS, Topological Sort |
02 | 210. Course Schedule II | Python | educative.io | Medium | 📌 Very Important. Check again. BFS, Topological Sort |
03 | 269. Alien Dictionary | Python, Swift | educative.io, Vid 1, Vid 2, Vid 3 | Hard | 📌 Very Important. Check again. BFS, Topological Sort |
04 | 444. Sequence Reconstruction | Python | educative.io | Medium/Hard | 📌 Check again. BFS, Topological Sort |
05 | 310. Minimum Height Trees | Python | educative.io | Hard | 📌 TODO: Check again, very hard, didn't get the intuition. BFS, Topological Sort |
06 | 329. Longest Increasing Path in a Matrix | Python | Official, Art 1, Art 2 | Hard | ** 📌 TODO: Not Done, very hard and important. DP, Topological Sort ** |
07 | 1203. Sort Items by Groups Respecting Dependencies | Python | Hard | 📌 TODO: Not Done, very hard, didn't get the intuition. BFS, Topological Sort | |
08 | 695. Max Area of Island | Python | --- | Medium | DFS |
09 | 200. Number of Islands | Python | Algoexpert.io - DFS, Union Find, Art 1 | Medium | DFS + DFS, Union Find |
10 | 305. Number of Islands II | Python | Union Find, Art 0, Art 1, Art 2, Art 3, Art 4, Art 5 | Hard | Union Find |
11 | 399. Evaluate Division | Python | Art 0, Art 1, Art 2, Art 3, Art 4, Art 5 | Medium | TODO: Solve it using Union Find |
12 | 841. Keys and Rooms | Python | codinginterviewclass.com, Art 1, Art 2 | Medium | BFS, DFS |
13 | 490. The Maze | Python | codinginterviewclass.com, Vid 1, Art 1, Art 2, Art 3, Art 4, Art 5 | Medium | Modified BFS and DFS |
14 | 130. Surrounded Regions | Python | codinginterviewclass.com, Art 1, Art 2 | Medium | TODO: Solve it using Union Find. Modified BFS and DFS |
15 | 127. Word Ladder | Python | backtobackswe.com, Official, Art 1 | Medium | Very important and tricky. Modified BFS. Shortest Path finding |
16 | 126. Word Ladder II | Python | backtobackswe.com, Official, Vid 1, Vid 2, Art 1 - Must | Hard | TODO: Not Done. Extremely tricky. Modified BFS. Learned Bidirectional Search |
17 | 785. Is Graph Bipartite? | Python, Swift | backtobackswe.com, Official | Medium | Important, Learned new things. Undirected Graph |
18 | 133. Clone Graph | Python, Swift | backtobackswe.com, Official | Medium | Important, Learned new things. Undirected Graph |
19 | 332. Reconstruct Itinerary | Python | Vid 1, Vid 2, Art 1, Art 2, Art 3, Art 4 | Medium | Important, Learned new things. Directed Graph. Eulerian path and top Sort |
20 | 1153. String Transforms Into Another String | Python | Vid 1, Vid 2, Art 1, Art 2, Art 3, Art 4, Art 5, Art 6 | Extremely Hard | TODO: Check again. Very Important and tricky, Learned new things. Digraph. |
21 | 743. Network Delay Time | Python | Official, Dijkstra 1, Dijkstra 2, Vid 1, Art 1, Art 2, Art 3, Art 4 | Medium | TODO: Check again. Very Important. Learned (Dijkstra, Bellman, Floyed). Check references section |
22 | 261. Graph Valid Tree | Python | Art 1, Art 2, Art 3, Art 4 | Medium | Important. BFS, DFS and Union Find |
23 | 1168. Optimize Water Distribution in a Village | Python | Art 1, Art 2, Art 3, Art 4 | Hard | TODO: Check AGain. Prim's and Kruskal's algorithm. Important. |
24 | 1197. Minimum Knight Moves | Python | Art 1 | Medium | TODO: Check AGain. Important. |
25 | 1066. Campus Bikes II | Python | Vid 1, Art 1 | Medium | 📌 TODO: CHECK Dijkstra approach again. Backtracking solution is getting TLE. Solve it and implement it with DP also. Very important |
26 | 752. Open the Lock | Python | Art 1, Art 2 | Medium | 📌 TODO: CHECK again. Very important and interesting problem. Loved it |
27 | 489. Robot Room Cleaner | Python, Swift | Vid 1, Vid 2, Art 1 | Hard | 📌 TODO: CHECK again. Very important and interesting problem. I fucking loved it |
28 | 1136. Parallel Courses | Python, Swift | --- | Hard | 📌 Topological sort. |
29 | 947. Most Stones Removed with Same Row or Column | Python, Swift | Vid 1, Art 1, Vid 2, Art 2, Art 3 | Medium | 📌 DFS and Union FInd |
30 | 1042. Flower Planting With No Adjacent | Python, Swift | --- | Easy | 📌 Could be done using DFS, BFS |
31 | 994_Rotting_Oranges | Python, Swift | --- | Medium | 📌 BFS |
32 | 909. Snakes and Ladders | Python, Swift | Art 1, Art 2, Art 3, Vid 1, Vid 2, | Medium | 📌 BFS. Check again |
33 | 1192. Critical Connections in a Network | Python, Swift | Art 1, Art 2, Art 3, Art 4, Vid 1, Vid 2, Vid 3 | Hard | 📌 Important, Learned new things.Tarjans SCCs algorithm. Check again |
34 | 694. Number of Distinct Islands | Python, Swift | Art 1, Art 2 | Medium | 📌 |
35 | 997. Find the Town Judge | Python, Swift | --- | Easy | 📌 |
36 | 733. Flood Fill | Python, Swift | --- | Easy | 📌 |
37 | 339. Nested List Weight Sum | Python, Swift | --- | Easy | 📌 |
38 | 1026. Maximum Difference Between Node and Ancestor | Python, Swift | --- | Medium | 📌 |
39 | 721. Accounts Merge | Python, Swift | --- | Medium | 📌 Loved it and hated it. Learned a lot. Very insightfull and tricky, deceiving problem. Be very carefull with your choice |
40 | 1123. Lowest Common Ancestor of Deepest Leaves | Python, Swift | --- | Medium | 📌 Loved it and hated it. |
41 | 419. Battleships in a Board | Python, Swift | --- | Medium | 📌 Union FInd and or DFS. |
42 | 934. Shortest Bridge | Python, Swift | Art 1 | Medium | 📌 DFS and BFS |
43 | 317. Shortest Distance from All Buildings | Python, Swift | Art 1 | Hard | 📌 BFS, a must do problem |
44 | 93. Restore IP Addresses | Python, Swift | --- | Medium | 📌 A must do problem. Backtracking |
45 | 1424. Diagonal Traverse II | Python, Swift | --- | Medium | 📌 Very interesting one. |
46 | 364_Nested_List_Weight_Sum_II | Python, Swift | --- | Medium | 📌 Hidden DFS |
47 | 1245. Tree Diameter | Python, Swift | Art 1 | Medium | 📌 Learned, 2 BFS. Important and interesting |
48 | 1376. Time Needed to Inform All Employees | Python, Swift | Art 1 | Medium | 📌 BFS, DFS |
49 | 286. Walls and Gates | Python, Swift | --- | Medium | 📌 BFS, DFS |
50 | 1138. Alphabet Board Path | Python, Swift | --- | Medium | 📌 BFS |
51 | 690. Employee Importance | Python, Swift | --- | Easy | 📌 BFS |
52 | **1631. Path With Minimum Effort ** | Python, Swift | --- | Medium | 📌 BFS, DFS, Binary search |
53 | **547. Friend Circles ** | Python, Swift | Art 1, Art 2 | Medium | 📌 BFS, DFS, Union Find |
Leetcode problems with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | 509. Fibonacci Number | Python | |||
02 | 50. Pow(x, n) | Python | |||
00 | It's a general topics which has been covered on Backtracking and graph problems | --- | --- | --- | --- |
14. Backtracking
Leetcode problems with solutions and tutorials/videos
15. Greedy
Leetcode problems with solutions and tutorials/videos
Follow this golden rule to approach any DP problem.
Leetcode problems with solutions and tutorials/videos
Follow this golden rule to approach any DP problem.
Leetcode problems with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | 78. Subsets | Python | Video 1, Video 2, Video 3 | Medium | 📌 TODO: code it in all 4 ways. First complete DFS, BFS, Bit Manipulation and some easy back tracking problem. ⭐ 😭 Didn't understand, check again |
02 | 187. Repeated DNA Sequences | Python | Official | Medium | ⭐ 😭 Didn't understand, check again |
03 | 461. Hamming Distance | Python | --- | Easy | 📌 The key here is to practice bit operation, i ignore any other attempts |
04 | 371. Sum of Two Integers | Python | Video 1, Atricle 1 | Easy | 📌 The key here is to practice bit operation, i ignore any other attempts |
05 | 169. Majority Element | Python | Atricle 1 | Easy | 📌 The key here is to practice bit operation, i ignore any other attempts |
06 | 191. Number of 1 Bits | Python | Article 1 | Easy | 📌 The key here is to practice bit operation |
07 | 268. Missing Number | Python | Educative.io, Official | Easy | 📌 Learned few very important binary logic properties. Also check cyclic sort technique |
08 | 389. Find the Difference | Python | --- | Easy | 📌 |
09 | 231. Power of Two | Python | Official, Signed number representations | Easy | 📌 Learned few very important binary logic properties |
10 | 136. Single Number | Python | Educative.io | Easy | 📌 The key here is to practice bit operation, i ignore any other attempts |
11 | 137. Single Number II | Python | 1, 2, 3, Check discussion | Medium | ⭐ 😭 Didn't understand, check again |
12 | 260. Single Number III | Python | Educative.io | Medium | ⭐ Check again, very important |
13 | 476. Number Complement | Python | Educative.io | Easy | ⭐ Check again |
14 | 832. Flipping an Image | Python | Educative.io | Easy | ⭐ Check again |
15 | 67. Add Binary | Python, Swift | Official, Art 1, Art 2, Vid 1, Vid 2 | Easy (FUCK NO) | ⭐ Check again |
18. Miscellaneous (Line Swap, Binary Indexed Tree, Segment Tree, Minimax, Math, AVL Tree, Red-Black Tree, Interval Tree etc)
Leetcode problems with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | 218. The Skyline Problem | Python, Swift | Vid 1, Vid 2, Vid 3, Vid 4, Art 1 | Hard | TODO: Not Done. Very important. |
02 | 375. Guess Number Higher or Lower II | Python, Swift | Art 0, Art 1, Art2 2, Art 3 | Hard | TODO: Not Done. Very important. Did't understand properly |
03 | 843. Guess the Word | Python | Art 1 | Hard | Minimax. TODO: Check again. Very important and interesting |
04 | 593. Valid Square | Python | Art 1, Art 2 | Medium | Math |
05 | 1272. Remove Interval | Python | Art 1 | Medium | Line Swap |
06 | 1288. Remove Covered Intervals | Python | Art 1 | Medium | Line Swap with Greedy. A must read solution. A gold mie, learned a lot |
07 | 1229. Meeting Scheduler | Python | Art 1 | Medium | Line Swap, learned a lot |
08 | 850. Rectangle Area II | Python | Art 1, Vid 1, Art 2 | Hard | Line Swap using heap and Segment Tree. TODO: Solve it using Segment Tree |
09 | 307. Range Sum Query - Mutable | Python | Vid 1, Art 1, Art 2 | Medium | Segment Tree Basics. Very Important |
10 | 327. Count of Range Sum | Python | Vid 1, Art 1, Art 2 | Hard | Segment Tree Basics. Very Important |
11 | 239. Sliding Window Maximum | Python | Video 1, Official, Art 1, Art 2, Art 3, Art 4 | Hard | 📌 Here, I have specifically focused on solving it with AVL and Red-Black Tree. A "Queue" approach can be found o Queue section |
12 | 398. Random Pick Index | Python | Video 1, Art 1, Art 2, Art 3, Art 4, Art 5 | Medium (Really!!??) | 📌 Reservoir sampling, What's the point of asking this into an interview!!?? |
13 | 319. Bulb Switcher | Python | Art 1, Art 2, Art 3 | Medium (Really!!??) | Are you fucking kidding me!! We are programmers, not math wizard. |
14 | 1344. Angle Between Hands of a Clock | Python, Swift | --- | Medium | FB really likes to ask tricky question. |
15 | 1276. Number of Burgers with No Waste of Ingredients | Python, Swift | Art 1, Art 2, Art 3 | Medium | Pure math |
16 | 777. Swap Adjacent in LR String | Python, Swift | Art 1 | Medium | Brainteser |
100 Problems
Problem statement from AlgoExpert.io with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | Two_Number_Sum | Swift, Python | |||
02 | Three_Number_Sum | Python | |||
03 | Smallest_Difference | Python | |||
04 | Four_Number_Sum | Python | |||
05 | Subarray_Sort | Python | |||
06 | Largest_Range | Python | |||
07 | Min_Rewards | Python | |||
08 | Zigzag_Traverse | Python | |||
08 | Apartment_Hunting | Python | |||
09 | Calendar_Matching | Python | |||
10 | Spiral_Traverse | Python | |||
11 | Monotonic_Array | Python | |||
12 | Move_Element_To_End | Python | |||
13 | Longest_Peak | Python |
Problem sstatement from AlgoExpert.io with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | BST_Construction_Iterative | Python | |||
02 | BST_Construction_Recursive | Python | |||
03 | Validate_BST | Python | |||
04 | Find_Closest_Value_in_BST | Python | |||
05 | BST_Traversal | Python | |||
06 | Same_BSTs | Python |
Problem sstatement from AlgoExpert.io with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | Invert_Binary_Tree | Python | |||
02 | Max_Path_Sum_In_Binary_Tree | Python | |||
03 | Iterative_In-order_Traversal | Python | |||
04 | Right_Sibling_Tree | Python | |||
05 | Branch_Sums | Python | |||
06 | Flatten_Binary_Tree | Python |
Problem statement from AlgoExpert.io with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | Number_Of_Ways_To_Make_Changes | Python | |||
02 | Minimum_Number_Of_Coins_For_Change | Python | |||
03 | Levenshtein_Distance | Python | |||
04 | Min_Number_Of_Jumps | Python | Video 1 | ||
05 | Max_Sum_Increasing_Subsequence | Python | |||
06 | Longest_Common_Subsequence | Python | Video 1 | ||
07 | Water_Area | Python | |||
08 | Knapsack_Problem | Python | |||
09 | Disk_Stacking | Python | |||
10 | Numbers_In_Pi | Python | |||
11 | Maximum_Subset_Sum_With_No_Adjacent_Element | Python | |||
12 | Max_Profit_With_K_Transactions | Python | |||
13 | Palindrome_Partitioning_Min_Cuts | Python | |||
14 | Longest_Increasing_Subsequence | Python | Video 1, Video 2, , Video 3 | ||
15 | Longest_String_Chain | Python | --- |
Problem statement from AlgoExpert.io with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | Kadane's_Algorithm | Python | |||
02 | Topological_Sort | Python | |||
03 | KMP_Algorithm | Python |
Problem sstatement from AlgoExpert.io with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | Youngest_Common_Ancestor | Python | |||
02 | Single_Cycle_Check | Python | |||
03 | River_Sizes | Python | |||
04 | Depth_First_Search | Python | |||
05 | Breadth_First_Search | Python | |||
06 | Boggle_Board | Python | |||
07 | Rectangle_Mania | Python | |||
07 | Airport_Connections | Python |
Problem sstatement from AlgoExpert.io with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | Min_Heap_Construction | Python | Video 1 | ||
02 | Continuous_Median | Python | Video 1, Video 2 |
Problem sstatement from AlgoExpert.io with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | Remove_Kth_Node_From_End | Python | |||
02 | Linked_List_Construction | Python | |||
03 | Find_Loop | Python | |||
04 | Reverse_Linked_List | Python | |||
05 | LRU_Cache | Python | |||
06 | Merge_Linked_List | Python |
Problem sstatement from AlgoExpert.io with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | Powerset | Python | |||
02 | Permutations | Python | |||
03 | Nth_Fibonacci | Python | |||
04 | Product_Sum | Python | |||
05 | Lowest_Common_Manager | Python | |||
06 | Number_Of_Possible_Binary_Tree_Topologies | Python | |||
07 | Interweaving_Strings | Python | |||
08 | Number_Of_Binary_Tree_Topologies | Python |
Problem sstatement from AlgoExpert.io with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | Search_In_Sorted_Matrix | Python | |||
02 | Find_Three_Largest_Number | Python | |||
03 | Binary_Search | Python | |||
04 | Shifted_Binary_Search | Python | |||
05 | Search_For_Range | Python | |||
06 | Quick_Select (Kth smallest/largest element) | Python |
Problem sstatement from AlgoExpert.io with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | Selection_Sort | Python | |||
02 | Insertion_Sort | Python | |||
03 | Bubble_Sort | Python | |||
04 | Quick_Sort | Python | Video 1 | ||
05 | Heap_Sort | Python | |||
06 | Merge_Sort | Python |
Problem sstatement from AlgoExpert.io with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | Balanced Bracket | Python | |||
02 | Min_Max_Stack_Construction | Python |
Problem statement from AlgoExpert.io with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | Palindrom_Check | Python | |||
02 | Longest_Palindromic_Substring | Python | |||
03 | Caesar_Cipher_Encryptor | Python | |||
04 | Longest_Substring_Without_Duplication | Python | |||
05 | Underscorify_Substring | Python | --- | Hard | TODO: Check again. Difficult to analyse the space ad time complexity |
06 | Pattern_Matcher | Python | |||
07 | Smallest_Substring_Containing | Python | |||
08 | Group_Anagrams | Python |
Problem sstatement from AlgoExpert.io with solutions and tutorials/videos
# | Title | Solution | Tutorial | Level | Remarks |
---|---|---|---|---|---|
01 | Suffix_Trie_Construction | Python | |||
02 | Multi_String_Search | Python |
Some helpful links, channels, tutorials, blogs.
Check this Golden posts first.
- How a Googler solves coding problems
- Nail Every Coding Interview by Becoming Asymmetrical
- How to get into FAANG
- Preparing for Programming interview with Python
- The 30-minute guide to rocking your next coding interview
- Google Interview Part-1 , Google Interview Part-2, Google Interview Part-3, Final Part
- Amazon ও Google এ চাকরির সুযোগ পাওয়ার প্রস্তুতি পর্ব
- How to use LeetCode effectively
- How to solve ANY interview question
- How To Ace The Google Coding Interview - Complete Guide
- Software Engineering Interviews: The Golden Path To Passing
- A MUST READ
- 10 Steps to Solving a Programming Problem
- Preparing to Apply or Interview at Google - Youtue playlist
- Amazon ও Google এ চাকরির সুযোগ পাওয়ার প্রস্তুতি পর্ব
- Coding Interviews
- Tech Interview Handbook
- Complete Introduction to the 30 Most Essential Data Structures & Algorithms
- How to Solve Any Code Challenge or Algorithm
Learn the following modules by heart. Just knowing all of the following items will made most of the problem one-liners.
- itertools - Functions creating iterators for efficient looping - They will help you, more often than you think
- collections - High-performance container datatypes - Believe me, this is pretty awesome
- heapq - Heap queue algorithm - Obviously, we don't have to hand-code heaps anymore
- bisect - Array bisection algorithm - Binary Search, simplified
- Set
- Dict - Now on, hash Tables are fun to work with
- Sorting - Don't participate in competitions without reading this completely.
- Start using lambda extensively
- functools
- Apart from these, all the builtin methods of default containers.
- Understanding slice notation - you will need/use it more than you can imagine
- Magic Methods
6. Tree (Binary Tree, BST, AVL, Red-Black, B-Tree, B+ Tree, Segment Tree, Interval Tree, Range Tree, BIT, N-aray Tree, Trie etc)
- Binary Tree playlist - Tushar Roy - Coding Made Simple
- 8 Useful Tree Data Structures Worth Knowing
- Segment Tree Range Minimum Query
- Exploring Segment Trees
- AVL Tree - Insertion and Rotations
- B Trees and B+ Trees. How they are useful in Databases
- Red Black Tree Insertion --- NOTE: Partho, read this
- Fenwick Tree or Binary Indexed Tree
- Fenwick Tree ( Binary Index Tree ) --- NOTE: Partho, read this
- Fenwick Tree or Binary Indexed Tree - youtube
- Binary Indexed Tree or Fenwick Tree - geeksforgeeks
- Binary Indexed Tree or Fenwick Tree - topcoder
- Segment Tree Range Minimum Query - youtube
- Segment Tree | Set 1 (Sum of given range) - geeksforgeeks
- Practical Data Structures for Frontend Applications: When to use Segment Trees
- What is the difference between a binary indexed tree and a segment tree?
- How does one decide when to use a Segment Tree or Fenwick Tree?
- What are the differences between segment trees, interval trees, binary indexed trees and range trees?
- Height, Depth and Level of a Tree
- What is the difference between tree depth and height?
- Graph Theory Playlist
- Graph Theory Playlist 2
- Union Find [Disjoint Set] Playlist
- Disjoint Sets Data Structure - Weighted Union and Collapsing Find
- Codinginterviewclass.com
- Single(Di-Bel)/All(Flo) Source Shortest Path Algorithms: Dijkstra (1, 2), Bellman-Ford(1, 2), Floyd–Warshall(1, 2)
- Dijkstra’s Algorithm Vs Bellman-Ford Algorithm Vs Floyd Warshall Algorithm ( 1, 2, 3 )
- Minimum Spanning Tree Algorithm: Prim's ( 1, 2, Kruskal's (1, 2 )
- Kruskal's algorithm Vs Prim's algorithm ( 1, 2, 3 )
- Tushar Roy - Coding Made Simple - Grapy Algorithm Playlist
- Bit Manipulation - youtube
- Conversion of Binary, Octal and Hexadecimal Numbers
- Your guide to Bit Manipulation
- Python Bitwise Operators
- Add Two Numbers Without The "+" Sign (Bit Shifting Basics)
- Binary Arithmetic
- 1’s and 2’s complement of a Binary Number
- What is “2's Complement”?
- Bits manipulation (Important tactics)
- Bit Manipulation
- Python Bitwise Operators
- XOR - The magical bitwise operator
- A summary: how to use bit manipulation to solve problems easily and efficiently - leetcode
- Bit Manipulation 4% of LeetCode Problems
- Coding Interview University - Bitwise operations
- Mask (computing)
- What is Bit Masking?
- Understanding Bit masks
- Bitmasks: A very esoteric (and impractical) way of managing booleans
- Hacker’s Delight - BOOK
- Bitwise operators — Facts and Hacks
- Signed number representations
- Vid 1, Vid 2
- The FAST method
- A good approach to attack DP
- Tabulation vs Memoization
- Memoization vs Tabulation
- 1D Subproblems vs. 2D Subproblems
- Memoization (1D, 2D and 3D)
- Introduction to Multi-dimensional Dynamic Programming
- Dynamic Programming Patterns - MUST READ
- My experience and notes for learning DP
- DP IS EASY! 5 Steps to Think Through DP Questions
- Dynamic Programming Patterns
- Backtracking - wiki
- Backtracking | Introduction
- Introduction to Backtracking - Brute Force Approach
- Branch and Bound Introduction
- The Backtracking Blueprint: The Legendary 3 Keys To Backtracking Algorithms
- Backtracking explained
- Foundation of algorithms - Chapter 5 (Backtracking) notes
- Backtracking Search Algorithms
- Learning to think with recursion, part 1
- Learning to think with recursion, part 2
- What makes a data structure recursive?
- Binary Tree as a Recursive Data Structure
- Recursion Visualizer - use Viz Mode
- Thinking Recursively in Python
- Breaking out of a recursive function?
- Why does recursion return the first call in the stack and not the last?