- Sorting:
- algorithms/sorting
- algorithms/heaps
- Binary Search
- algorithms/binarysearch
- https://leetcode.com/problem-list/mco0czkv/
- Two Pointer: https://leetcode.com/problemset/?topicSlugs=two-pointers&page=1&status=AC
- Tree:
- Morris Traversals: algorithms/trees
- LRU Cache:
- interviews/twentytwentyfour/truefoundry/PerformantLRUCache.java
- gfg/LRUCacheUsingDoublyLL.java
- Union Find:
- DP:
- Kadanes: algorithms/kadanes
- Bounded knapsack: algorithms/dp/knapsack/bounded
- Unbounded knapsack: algorithms/dp/knapsack/unbounded
- Leetcode:
- BFS: https://leetcode.com/problem-list/ae112xpe/
- DFS: https://leetcode.com/problem-list/aejlo6qc/
- Previous interview questions:
- interviews/twentytwentyone
- interviews/twentytwentyfour
- Graphs: refer below graph material
- Resource: https://books.dwf.dev/docs/system-design/c0
- Previous design round experiences: https://drive.google.com/drive/folders/1xWcT7pfzTsa4zALoGlCzoNkdmWTPlUyH
- Projects & behavioural questions: https://docs.google.com/document/d/1PfN_HdsHHDAYmDmrCW68uEN0pAESB4b6IaCZHWR6i2w/edit?tab=t.0#heading=h.bfpofn2ezxlz
This repo is dedicated to learn and practice algorithms. This repo is divided in following sections:
- /java/algorithms: it has questions grouped under different algorithms e.g. DP, Kadanes, Sorting etc.
- /java/interviews: it has questions that were asked in different company interviews e.g. /java/interviews/2024/adyen/CheapestBankRoute
- /java/javaoutputquestions: it has questions related to java language
- /java/leetcode: it has questions picked up from Leetcode
- /java/gfg: it has questions picked up from Geeks for Geeks
Now lets talk about some specific Data Structures:
Important Graph algorithms:
- Dijkstra's Algorithm:
- It is a Single-Source-Shortest-Path algorithm, which means that it calculates shortest distance from one vertex to all the other vertices.
- Does not work for negative edge weights.
- Good read: https://leetcode.com/discuss/general-discussion/1059477/A-noob's-guide-to-Djikstra's-Algorithm
- Questions: https://leetcode.com/problem-list/mf5wgvxr/
- Union Find:
- This algo is used whenever you see any kind of grouping in the elements
- It can only be applied to undirected graphs
- Good read: https://yuminlee2.medium.com/union-find-algorithm-ffa9cd7d2dba
- Questions: https://leetcode.com/problem-list/mjqrceu6/
- Topological Sort:
- It can only be applied on directed graphs and where there is some precedence of some tasks. For ex: T1->T2, task T1 should occur before task T2.
- Good read: https://leetcode.com/discuss/general-discussion/1078072/introduction-to-topological-sort
- Questions: https://leetcode.com/problem-list/mfu82mp1/
- Minimum Spanning Tree(MST):
- Prim's Algorithm and Kruskal's Algorithm
- Good read: https://leetcode.com/discuss/study-guide/1131969/Minimum-Spanning-Tree-beginner's-guide
- Questions:
DSA Round: do some research first
- Prep top 30-40 question of DSA from https://www.hellointerview.com/
- Prep all the questions saved from your Leetcode account
- Prep all the questions from HelloWorld project in IntelliJ
Code Design Round: do some research first
- Write complete logic for snake game
- Practice and revise from Flipkart's machine coding round.
Systems Design Round: