Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 32 additions & 114 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,134 +1,52 @@
# 🚀 Babua DSA Patterns Course 2025 – 90 Day Challenge (by CTO Bhaiya)
# 🚀 DSA Patterns Course 2025 – 90-Day Challenge

Welcome to the **DSA Patterns 2025** Course — a **90-day challenge** to master the **30 core coding patterns** used in FAANG and top product interviews.
Instead of solving 1000 random questions, you'll learn how to **think in patterns** — and solve any problem confidently.
A structured 90-day preparation plan to master the 30 essential **DSA Patterns** used in top product-based company interviews.
This repository contains my daily progress, notes, solved questions, and reflections.

---

## 🚀 Pre-requistes of Babua DSA Patterns Sheet 2025
[Onboarding Sheet](https://github.com/team-codebug/babua-dsa-patterns-course/blob/main/ONBOARDING.md)


## 🚀 Babua DSA Patterns Sheet 2025
[Babua Sheet](https://docs.google.com/spreadsheets/d/1T3vPcwlWdMRMYSf8IxQCKb3gX7rGzDss-ZU-R4XFM14/edit?usp=sharing)

## 🚀 Babua DSA Patterns Revision Sheet 2025
[Babua DSA Patterns Sheet 2025](https://docs.google.com/spreadsheets/d/1RESAUKlHFjdCrEO9YDySoHaHnn_FMdrAgSV9NdZdVos/edit?usp=sharing)
- Make a copy of this sheet to start using the DSA Revision sheet
- 🧠 **Revise Each thing at least 4 times** - Use the revision sheet to practice theory and questions multiple times so that you don't forget

## 📘 About the Course
## 📘 Course Overview

**Duration:** 90 Days
**Instructor:** CTO Bhaiya (NITKian)
**Language:** Java (main), Python (optional), Hindi explanations
**Daily Timing:** 5 PM IST on YouTube

Each pattern includes:
- 🎥 **Theory Video** — Learn the logic and intuition behind the pattern
- 🧠 **Problem Set (15–20 LeetCode Questions)**
- 🗒️ **Notes & Solutions**

---
**Focus:** DSA Pattern-Based Learning
**Language:** Java (primary)

## 💡 Why Learn DSA by Patterns?
Each day includes:

✅ Covers 95% of all coding interview problems
✅ Learn faster by recognizing problem patterns
✅ Helps you revise logically, not by brute memorization
✅ Builds intuition and confidence for FAANG-level interviews
- Concept explanation
- Pattern intuition
- Problem set
- Notes & practice questions

---

## 📅 90-Day Progress Tracker

Mark your progress by ticking ✅ each day.
Links will be updated as the series goes live!
## 🎯 My Goals

| Day | Topic / Pattern | 🎥 Video Link | 🗒️ Notes | ✅ Done |
|-----|------------------|---------------|-----------|--------|
| 0 | Complete DSA Patterns In 90 Days Course - Crack Coding Interviews in 3 Months - Day 0/90 - Intro | [Watch Now](https://www.youtube.com/watch?v=zvK49innOZY&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/blob/main/0_Day) | ✅ |
| 1 | Day 1/90 - ⚡ Two Pointers Theory - DSA Pattern #1 - DSA Pattern You Must Know! | [Watch Now](https://www.youtube.com/watch?v=Elnhh8cC2vM&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=2) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/blob/main/1_Day) | ✅ |
| X | Disclaimer: NO CONTROVERSY!!! | [Watch Now](https://www.youtube.com/watch?v=vJ2xa878E-M&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=3) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/blob/main/we_need_to_talk.svg) | ✅ |
| X | DSA Crash Course (Topic-Wise) + Onboarding SHEET + PATTERNS LIST | [Watch Now](https://www.youtube.com/watch?v=Xl0wuOqWWfQ&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=4) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/blob/main/sheet.svg) | ✅ |
| 2 | Day 2/90 - ⚡Master 5 Two Pointer Problems - Babua DSA Patterns - Crack Coding Interviews | [Watch Now](https://www.youtube.com/watch?v=Yi90cuHYyWQ&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=5) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/tree/main/2_Day) | ✅ |
| X | The ONLY DSA Sheet You’ll Ever Need in 2025 ⚡ - 30 Patterns + Problems Explained | [Watch Now](https://www.youtube.com/watch?v=4KRw2qdWTKM&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=6) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/blob/main/Babua-DSA-Patterns-Questions.svg) | ✅ |
| 3 | Day 3/90 🔥 Master Two Pointer Pattern - 5 LeetCode Problems Explained - Babua DSA Patterns 2025 | [Watch Now](https://www.youtube.com/watch?v=SP065oLnxGA&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=7) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/tree/main/3_Day) | ✅ |
| 4 | Day 4/90 🔥Three Popular Interview Questions Two Pointer Pattern - Babua DSA Patterns 2025 | [Watch Now](https://www.youtube.com/watch?v=pcj6S1KLxWc&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=8) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/tree/main/4_Day) | ✅ |
| 5 | Day 5/90 🔥Three Popular Interview Questions of Two Pointer Pattern - Babua DSA Patterns 2025 | [Watch Now](https://www.youtube.com/watch?v=jA74srakqvI&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=9) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/tree/main/5_Day) | ✅ |
| X | Complete DSA Patterns Course 2025 - Recap + Onboarding + Homework - Babua DSA Patterns Course | [Watch Now](https://www.youtube.com/watch?v=MwI_UZlnl6I&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=10) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/blob/main/Recap%20%2B%20Homework.excalidraw.svg) | ✅ |
| X | From NOBODY to NITK, IITM, Intuit, Adobe, CTO and finally CEO of my own Company - My Journey so far | [Watch Now](https://www.youtube.com/watch?v=vMndRzz1SRo&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=11) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/blob/main/MY%20JOURNEY.svg) | ✅ |
| 6 | Day 6/90 🔥 Solve Three Popular String Interview Questions with 1 Trick - Babua DSA Patterns 2025 | [Watch Now](https://www.youtube.com/watch?v=IW8gQ2u2O_I&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=12) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/tree/main/6_Day) | ✅ |
| 7 | Day 7/90 - ⚡ 🚀 Fast & Slow Pointers Explained - Crack Linked List Problems in O(n) - DSA Pattern #2 | [Watch Now](https://www.youtube.com/watch?v=FguUjuCzhj0&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=13) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/tree/main/7_Day) | ✅ |
| 8 | Day 8/90 - ⚡ 🚀 5 Popular Interview Questions Fast & Slow Pointers Pattern - DSA Pattern #2 | [Watch Now](https://www.youtube.com/watch?v=eIItwq8UTmU&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=14) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/tree/main/8_Day) | ✅ |
| X | The DSA Revolution has started - And "THEY" are not HAPPY | [Watch Now](https://www.youtube.com/watch?v=lkbQGa2tEYQ&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=15) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/blob/main/DSA%20Revolution%20Started.excalidraw.svg) | ✅ |
| 9 | Day 9/90 - ⚡ 🚀 3 Popular Interview Questions Fast & Slow Pointers Pattern - DSA Pattern #2 | [Watch Now](https://www.youtube.com/watch?v=E85jp_rHivc&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=16) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/tree/main/9_Day) | ✅ |
| 10 | Day 10/90 - ⚡2130. Maximum Twin Sum of a Linked List - Fast & Slow Pointers Pattern - DSA Pattern #2 | [Watch Now](https://www.youtube.com/watch?v=t40HN4Rla30&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=17) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/tree/main/10_Day) | ✅ |
| 11 | Day 11/90 - ⚡457. Circular Array Loop - Fast & Slow Pointers Pattern - DSA Pattern #2 | [Watch Now](https://www.youtube.com/watch?v=nFZ1mysCZc0&list=PLVItHqpXY_DDFNeS6NUUoRsloyaPRdl1l&index=18) | [Notes](https://github.com/team-codebug/babua-dsa-patterns-course/tree/main/11_Day) | ✅ |
- Build strong fundamental intuition of DSA patterns
- Solve 300+ high-quality coding problems
- Maintain a 90-day consistency streak
- Prepare effectively for internship & placement interviews

---

## 🏁 How to Track Progress

1. **Fork this repo**
2. Replace ⬜ with ✅ as you finish each day
3. Post daily updates on **LinkedIn** with the hashtag **#DSAin90Days** and tag **@CTOBhaiya**
4. Keep your streak — and share your learning journey!

---

## 🧩 **LinkedIn Daily Progress Template (for Students)**

> 📅 **Day [X] / 90 – DSA Patterns Challenge 2025**
>
> ✅ **Today’s Pattern:** [Pattern Name — e.g., Sliding Window / Two Pointers]
> 🎥 **Video:** [YouTube Link]
> 🗒️ **Notes:** [Notes Link or GitHub Link]
>
> 🧠 **What I learned today:**
>
> * [Write 1–2 key insights — e.g., how the sliding window helps optimize brute force approaches, etc.]
> * [Any “aha moment” or tricky question solved today]
>
> 🔍 **Next Goal:** [Example: Practice all LeetCode questions from this pattern / Revise previous pattern tomorrow]
>
> 💬 **Reflection:**
> [Share your experience — was it easy, tough, interesting? Encourage others to join in!]
>
> 🚀 **#DSAin90Days #DSAPatterns2025 #CTOBhaiya #FAANGPreparation #LeetCodePatterns #CodingInterviewPreparation #LearnCodeCrack #ThinkInPatterns**
>
> 🙌 Learning under the guidance of **[@Anuj Kumar](https://www.linkedin.com/in/anuj-kumar-9a188968/)** – Thank you for making DSA feel simple and structured!

---

### 🧠 Example Post

> 📅 **Day 4 / 90 – DSA Patterns Challenge 2025**
>
> ✅ **Pattern:** Two Pointers
> 🎥 **Video:** [https://youtu.be/...](#)
> 🗒️ **Notes:** [https://github.com/...](#)
>
> 🧠 Learned how to solve *“Remove Nth Node from End of List”* and *“3Sum”* efficiently using the two-pointer pattern.
> The biggest takeaway today — **simplify the logic by narrowing down the search space** instead of brute forcing!
>
> 🔍 **Next Goal:** Move to Fast & Slow Pointer pattern tomorrow.
>
> 🙌 Thanks **[@Anuj Kumar](https://www.linkedin.com/in/anuj-kumar-9a188968/)** for this amazing structure!
>
> 🚀 #DSAin90Days #DSAPatterns2025 #FAANGPreparation #CTOBhaiya #LeetCodePatterns #CodingInterviewPreparation #ZeroToHeroDSA

---

## 🌟 Connect & Learn
## 📅 90-Day Progress Tracker

- 📺 [YouTube Channel](https://www.youtube.com/@CodingwithCTOBhaiya)
- 💼 [LinkedIn](https://www.linkedin.com/in/anuj-kumar-9a188968/)
- 🌐 [Website](#)
| Day | Topic / Pattern | Video | Status |
| :-: | -------------------------------- | -------------------------------------------------------- | ------ |
| 1 | Two Pointers – Theory | [Link](https://youtu.be/Elnhh8cC2vM?si=OVrgsym_qKhpVgj4) | ✅ |
| 2 | Two Pointers – Questions | [Link](https://youtu.be/Yi90cuHYyWQ?si=BK3RJK2C4gYBk9BG) | ✅ |
| 3 | Two Pointers – Questions | [Link](https://youtu.be/SP065oLnxGA?si=3rQcrVhkDQQn2nqZ) | ✅ |
| 4 | Two Pointers – Questions | [Link](https://youtu.be/pcj6S1KLxWc?si=lpDF9O_Yw8Bv1HI5) | ✅ |
| 5 | Two Pointers – Questions | [Link](https://youtu.be/jA74srakqvI?si=ecv4UgGYbSyz7Tml) | ✅ |
| 6 | Two Pointers – Questions | [Link](https://youtu.be/IW8gQ2u2O_I?si=CEOpWgrmnhlVKU1l) | ✅ |
| 7 | Fast & Slow Pointers – Theory | [Link](https://youtu.be/FguUjuCzhj0?si=WF-FZUP6NwullPjW) | ✅ |
| 8 | Fast & Slow Pointers – Questions | [Link](https://youtu.be/eIItwq8UTmU?si=l-owDQYThTpMbeCC) | ✅ |
| 9 | Fast & Slow Pointers – Questions | [Link](https://youtu.be/E85jp_rHivc?si=ZPjAqpnRoUflGtfo) | ✅ |
| 10 | Fast & Slow Pointers – Questions | [Link](https://youtu.be/t40HN4Rla30?si=FtncjOsYniEbYk9L) | ✅ |
| 11 | Fast & Slow Pointers – Questions | [Link](https://youtu.be/nFZ1mysCZc0?si=orEJbkm8q9NEOdQb) | 🔲 |

---

**Let’s master DSA by patterns — not by luck.**
Start your journey today. Comment “Done ✅” when you finish Day 0!
## 🔗 Resources

---
- YouTube: _Coding with CTO Bhaiya_
40 changes: 40 additions & 0 deletions my_solutions/Day_10
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#LC 2130: Maximum Twin Sum of a Linked List
(similar to palindrome LL)


class Solution {
public ListNode findMid(ListNode head){
ListNode slow = head;
ListNode fast = head;
while(fast != null && fast.next != null){
slow = slow.next;
fast = fast.next.next;
}
return slow;
}
public int pairSum(ListNode head) {

ListNode midNode = findMid(head);

ListNode curr = midNode;
ListNode prev = null;
ListNode next;
while(curr != null){
next = curr.next;
curr.next = prev;
prev = curr;
curr = next;
}
ListNode right = prev;
ListNode left = head;
int maxSum = Integer.MIN_VALUE;
int sum = 0;
while(right != null){
sum = left.val + right.val;
maxSum = Math.max(sum, maxSum);
left = left.next;
right = right.next;
}
return maxSum;
}
}
171 changes: 171 additions & 0 deletions my_solutions/Day_2
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# 📝 Solutions

#1️ Palindrome String
Problem: Check if a given string is a valid palindrome considering only alphanumeric characters and ignoring cases.

# ✅ Solution

class Solution {
public boolean isPalindrome(String s) {

int i = 0;
int j = s.length() - 1;

s = s.toLowerCase();

while(i < j)
{
char ch_i = s.charAt(i);
char ch_j = s.charAt(j);

if(!Character.isLetterOrDigit(ch_i)){
i++;
continue;
}

if(!Character.isLetterOrDigit(ch_j)){
j--;
continue;
}

if(ch_i != ch_j)
return false;

i++;
j--;
}
return true;
}
}

#️2 Reverse String
Problem: Reverse the characters of a character array in-place.

# ✅ Solution

class Solution {
public void reverseString(char[] s) {
int i = 0;
int j = s.length - 1;

while(i < j){

char temp = s[i];
s[i] = s[j];
s[j] = temp;

i++;
j--;
}
}
}


#️3 Sorted Squares
Problem:Given a sorted array, return the array of squares of each number, sorted non-decreasing.

# ✅ Solution

class Solution {
public int[] sortedSquares(int[] nums) {

int i = 0;
int j = nums.length - 1;

int[] ans = new int[nums.length];
int idx = nums.length - 1;

while(i <= j){

if(Math.abs(nums[i]) > Math.abs(nums[j])){
ans[idx--] = nums[i] * nums[i];
i++;
}
else{ // equal case handled automatically
ans[idx--] = nums[j] * nums[j];
j--;
}
}
return ans;
}
}

#️4 Valid Palindrome II
Problem:Given a string s, return true if the s can be palindrome after deleting at most one character from it.

# ✅ Solution
class Solution {
public boolean helper(int i, int j, String s){

while(i < j){
if(s.charAt(i) != s.charAt(j))
return false;

i++;
j--;
}
return true;

}
public boolean validPalindrome(String s) {

int i = 0 ;
int j = s.length() - 1;

while(i < j){

char left = s.charAt(i);
char right = s.charAt(j);

if(left != right){
return helper(i + 1, j, s) || helper(i, j - 1, s);
}

i++;
j--;
}
return true;
}
}

#️5 Valid Word Abbreviation(NeetCode)

class Solution {
public boolean validWordAbbreviation(String word, String abbr) {
int i = 0, j = 0;
int n = word.length(), m = abbr.length();

while(i < n && j < m){

char abbr_chr = abbr.charAt(j);

// Case 1: Letter → must match
if(Character.isLetter(abbr_chr)){
if(word.charAt(i) != abbr_chr)
return false;

i++;
j++;
}
else {
// Leading zero not allowed
if(abbr_chr == '0') return false;

int dig = 0;


while(j < m && Character.isDigit(abbr.charAt(j))){
dig = dig * 10 + (abbr.charAt(j) - '0');
j++;
}


i += dig;
}
}

return i == n && j == m;
}
}


Loading