DSA for interview - FAME-DEV/Java-Test GitHub Wiki

How to clear coding rounds.

Every Company First round is a coding round. So cracking this round is really important if you want to go to the next round. But we solve multiple problems but still we are not able to crack this round.

Here are a few steps you can follow which will help you to crack this interview round:

  1. Understand the requirements and write down important keywords
  2. Reframe the question to make sure you understand it
  3. Ask edge cases in the input
  4. Explain the brute force solution in a minute
  5. Explain the optimal solution and discuss its asymptotic complexity quickly
  6. Ask if the optimal solution is acceptable
  7. Write code in the language you're comfortable with
  8. Dry run the code line by line to find mistakes
  9. Rewrite code to cover edge or base cases if necessary
  10. Review the solution's asymptotic complexity
  11. Ask if tests or concurrency cases are necessary
  12. Ask for the interviewer's feedback

Think before you code, Learn patterns, not problems.

You don't have to solve every LeetCode question out there. To truly master data structures and algorithms (DSA), it's essential to recognize and understand patterns in problems. Here are some valuable resources to help you get started:

โžค Coding problem patterns:

โžค 80 most asked DSA questions:

โžค Tips to solve any DSA question by understanding patterns:

โžค How to guess the solution for DSA problems:

โžค DSA is so easy when you follow these 6 steps:

โžค Roadmap for getting started with Data Structures and Algorithms (DSA):

โžค Never skip to solve these DSA QUESTIONS:

By focusing on patterns and understanding the underlying principles, you'll find DSA much more manageable and intuitive.

Let me know in the comments: How would you rate yourself in DSA?

Personally, Iโ€™d rate myself an 8, but these steps have really helped me crack multiple interviews.

DSA a day can keep interview rejection away.

Yes practicing at least one question a day can help you crack any SDE interview.

I've compiled a collection of about 16 coding problem patterns that I think can be incredibly beneficial for anyone looking to grasp these powerful algorithmic techniques.

These patterns have the potential to significantly impact your performance in coding interviews.

  1. ๐’๐ฎ๐›๐ฌ๐ญ๐ซ๐ข๐ง๐  ๐๐ซ๐จ๐›๐ฅ๐ž๐ฆ ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/giASrwds
  2. ๐’๐ฅ๐ข๐๐ข๐ง๐  ๐–๐ข๐ง๐๐จ๐ฐ ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gjatQ5pK
  3. ๐“๐ฐ๐จ ๐๐จ๐ข๐ง๐ญ๐ž๐ซ๐ฌ ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gBfWgHYe
  4. ๐๐š๐œ๐ค๐ญ๐ซ๐š๐œ๐ค๐ข๐ง๐  ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/g9csxVa4
  5. ๐ƒ๐ฒ๐ง๐š๐ฆ๐ข๐œ ๐๐ซ๐จ๐ ๐ซ๐š๐ฆ๐ฆ๐ข๐ง๐  ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ 1: https://lnkd.in/gbpRU46g
  6. ๐ƒ๐ฒ๐ง๐š๐ฆ๐ข๐œ ๐๐ซ๐จ๐ ๐ซ๐š๐ฆ๐ฆ๐ข๐ง๐  ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ 2: https://lnkd.in/gcnBActT
  7. ๐๐ข๐ง๐š๐ซ๐ฒ ๐’๐ž๐š๐ซ๐œ๐ก ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gKEm_qUK
  8. ๐๐š๐œ๐ค๐ญ๐ซ๐š๐œ๐ค๐ข๐ง๐  ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gVkQX5vA
  9. ๐“๐ซ๐ž๐ž ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gKja_D5H
  10. ๐†๐ซ๐š๐ฉ๐ก ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gKE6w7Jb
  11. ๐Œ๐จ๐ง๐จ๐ญ๐จ๐ง๐ข๐œ ๐’๐ญ๐š๐œ๐ค ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gdYahWVN
  12. ๐๐ข๐ญ ๐Œ๐š๐ง๐ข๐ฉ๐ฎ๐ฅ๐š๐ญ๐ข๐จ๐ง ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gmMMST5J
  13. ๐’๐ญ๐ซ๐ข๐ง๐  ๐๐ฎ๐ž๐ฌ๐ญ๐ข๐จ๐ง ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gkNvEi8j
  14. ๐ƒ๐…๐’ + ๐๐…๐’ ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ 1: https://lnkd.in/gPgpsgaQ
  15. ๐ƒ๐…๐’ + ๐๐…๐’ ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ 2: https://lnkd.in/gd4ekfQe
  16. 14 ๐‚๐จ๐๐ข๐ง๐  ๐ˆ๐ง๐ญ๐ž๐ซ๐ฏ๐ข๐ž๐ฐ ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gMZJVkFf

Consistency is the key!!

Here are some of the best platforms to practice DSA problems daily.

  1. HackerRank
  2. LeetCode
  3. GeeksforGeeks
  4. takeUforward Youtube Channel
  5. Love Babbar Youtube Channel
  6. Piyush Agarwal Youtube Channel
  7. Code With Harry Youtube Channel - https://lnkd.in/d-Uq-tCn

Donโ€™t Just LeetCode: Follow the Coding Patterns Insteadโšก

I've compiled a collection of about 16 coding problem patterns that I think can be incredibly beneficial for anyone looking to grasp these powerful algorithmic techniques.

These patterns have the potential to significantly impact your performance in coding interviews.

  1. ๐’๐ฎ๐›๐ฌ๐ญ๐ซ๐ข๐ง๐  ๐๐ซ๐จ๐›๐ฅ๐ž๐ฆ ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/giASrwds

  2. ๐’๐ฅ๐ข๐๐ข๐ง๐  ๐–๐ข๐ง๐๐จ๐ฐ ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gjatQ5pK

  3. ๐“๐ฐ๐จ ๐๐จ๐ข๐ง๐ญ๐ž๐ซ๐ฌ ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gBfWgHYe

  4. ๐๐š๐œ๐ค๐ญ๐ซ๐š๐œ๐ค๐ข๐ง๐  ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/g9csxVa4

  5. ๐ƒ๐ฒ๐ง๐š๐ฆ๐ข๐œ ๐๐ซ๐จ๐ ๐ซ๐š๐ฆ๐ฆ๐ข๐ง๐  ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ 1: https://lnkd.in/gbpRU46g

  6. ๐ƒ๐ฒ๐ง๐š๐ฆ๐ข๐œ ๐๐ซ๐จ๐ ๐ซ๐š๐ฆ๐ฆ๐ข๐ง๐  ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ 2: https://lnkd.in/gcnBActT

  7. ๐๐ข๐ง๐š๐ซ๐ฒ ๐’๐ž๐š๐ซ๐œ๐ก ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gKEm_qUK

  8. ๐๐š๐œ๐ค๐ญ๐ซ๐š๐œ๐ค๐ข๐ง๐  ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gVkQX5vA

  9. ๐“๐ซ๐ž๐ž ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gKja_D5H

  10. ๐†๐ซ๐š๐ฉ๐ก ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gKE6w7Jb

  11. ๐Œ๐จ๐ง๐จ๐ญ๐จ๐ง๐ข๐œ ๐’๐ญ๐š๐œ๐ค ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gdYahWVN

  12. ๐๐ข๐ญ ๐Œ๐š๐ง๐ข๐ฉ๐ฎ๐ฅ๐š๐ญ๐ข๐จ๐ง ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gmMMST5J

  13. ๐’๐ญ๐ซ๐ข๐ง๐  ๐๐ฎ๐ž๐ฌ๐ญ๐ข๐จ๐ง ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gkNvEi8j

  14. ๐ƒ๐…๐’ + ๐๐…๐’ ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ 1: https://lnkd.in/gPgpsgaQ

  15. ๐ƒ๐…๐’ + ๐๐…๐’ ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ 2: https://lnkd.in/gd4ekfQe

  16. 14 ๐‚๐จ๐๐ข๐ง๐  ๐ˆ๐ง๐ญ๐ž๐ซ๐ฏ๐ข๐ž๐ฐ ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ: https://lnkd.in/gMZJVkFf

The Problem: Preparing for coding interviews, especially for Software Development Engineer (SDE) roles at top companies, can be really hard and time-consuming. It often takes months of studying and practicing. But what if you don't have that much time?

The Solution: Many people use a platform called LeetCode to practice coding questions. However, with over 2000 questions available, it can be overwhelming to know where to start.

A helpful strategy is to focus on quality over quantity. Instead of trying to solve every single problem, concentrate on understanding the fundamental concepts by practicing a smaller set of high-quality questions. Choose problems that cover a wide range of topics and difficulty levels, and make sure you thoroughly understand each solution.

Additionally, join study groups or online communities where you can discuss problems, share insights, and learn from others. This collaborative approach can help you understand different problem-solving techniques and improve your skills more efficiently.

Finally, remember the importance of regular practice and consistency. Even if you can only spend a little time each day on coding practice, staying consistent will help reinforce your learning and build momentum over time.

DSA was extremely HARD

Until I found these 14 Problem Solving Patternsโšก

  1. Two Pointer Problems: https://lnkd.in/dK_fB-Eg

  2. Backtracking Pattern: https://lnkd.in/dDGsdfps

  3. Dynamic Programming Patterns: https://lnkd.in/dX7a4cau

  4. Dynamic Programming Patterns 2: https://lnkd.in/db2tAp27

  5. Powerful Ultimate Binary Search Template: https://lnkd.in/dxk7kdeb

  6. A general approach to backtracking questions: https://lnkd.in/drsHxsZh

  7. Binary Tree Traversal & Views: https://lnkd.in/dxGcKx65

  8. Graph For Beginners [Problems | Pattern | Sample Solutions]: https://lnkd.in/dkpyiB3R

  9. A comprehensive guide and template for monotonic stack based problems: https://lnkd.in/dtmFMzDJ

  10. All Types of Patterns for Bits Manipulations and How to use it: https://lnkd.in/d-rfVNx2

  11. Collections of Important String questions Pattern: https://lnkd.in/dCy_j-vw

  12. Leetcode Pattern 1 | BFS + DFS == 25% of the problems: https://lnkd.in/dtaEpzrC

  13. Template that can solve most 'substring' problems: https://lnkd.in/dEbVbBu4

  14. C++ Maximum Sliding Window Cheat sheet Template: https://lnkd.in/dPiMzzpA