From 98bdce88a210d8a901cc57d15f830454441a35f3 Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sat, 22 Nov 2025 21:29:21 +0530 Subject: [PATCH 01/22] edited readme Updated the status of various DSA course videos and notes in the README. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8454d68..21f224d 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,10 @@ Links will be updated as the series goes live! | 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) | βœ… | +| 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) | πŸ”² | --- From 284b83fa76cb6fe2cdb83120b5d7ea77731b47d1 Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sat, 22 Nov 2025 21:33:18 +0530 Subject: [PATCH 02/22] Update README.md --- README.md | 124 ++++++++++++------------------------------------------ 1 file changed, 26 insertions(+), 98 deletions(-) diff --git a/README.md b/README.md index 21f224d..df6a565 100644 --- a/README.md +++ b/README.md @@ -1,120 +1,48 @@ -# πŸš€ 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. --- -## πŸš€ Babua DSA Patterns Sheet 2025 -[Babua Sheet](https://docs.google.com/spreadsheets/d/1T3vPcwlWdMRMYSf8IxQCKb3gX7rGzDss-ZU-R4XFM14/edit?usp=sharing) - -## πŸ“˜ 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 +**Focus:** DSA Pattern-Based Learning +**Language:** Java (primary) -Each pattern includes: -- πŸŽ₯ **Theory Video** β€” Learn the logic and intuition behind the pattern -- 🧠 **Problem Set (15–20 LeetCode Questions)** -- πŸ—’οΈ **Notes & Solutions** +Each day includes: +- Concept explanation +- Pattern intuition +- Problem set +- Notes & practice questions --- -## πŸ’‘ Why Learn DSA by Patterns? +## 🎯 My Goals -βœ… 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 +- 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 --- ## πŸ“… 90-Day Progress Tracker -Mark your progress by ticking βœ… each day. -Links will be updated as the series goes live! - -| 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) | πŸ”² | - ---- - -## 🏁 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! +I update this table daily as I complete each topic. ---- +| 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)| βœ… | -### 🧠 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 +(Will be updated daily as the series progresses.) --- -## 🌟 Connect & Learn +## πŸ”— Resources -- πŸ“Ί [YouTube Channel](https://www.youtube.com/@CodingwithCTOBhaiya) -- πŸ’Ό [LinkedIn](https://www.linkedin.com/in/anuj-kumar-9a188968/) -- 🌐 [Website](#) - ---- - -**Let’s master DSA by patterns β€” not by luck.** -Start your journey today. Comment β€œDone βœ…β€ when you finish Day 0! - ---- +- YouTube: *Coding with CTO Bhaiya* From 4cab133d2a96542065843ee9e535cfc3019c0ea1 Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sat, 22 Nov 2025 21:34:44 +0530 Subject: [PATCH 03/22] Create my_solutions.java --- my_solutions.java | 1 + 1 file changed, 1 insertion(+) create mode 100644 my_solutions.java diff --git a/my_solutions.java b/my_solutions.java new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/my_solutions.java @@ -0,0 +1 @@ + From e2f32eb23e6603917c273c85ef0e64fa5a0ebc0f Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sat, 22 Nov 2025 21:39:35 +0530 Subject: [PATCH 04/22] Delete my_solutions.java --- my_solutions.java | 1 - 1 file changed, 1 deletion(-) delete mode 100644 my_solutions.java diff --git a/my_solutions.java b/my_solutions.java deleted file mode 100644 index 8b13789..0000000 --- a/my_solutions.java +++ /dev/null @@ -1 +0,0 @@ - From 0e674eb9d7698d15660969256e7aa53d8ac9dd1d Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sat, 22 Nov 2025 21:40:11 +0530 Subject: [PATCH 05/22] Create Day_1 --- my_solutions/Day_1 | 1 + 1 file changed, 1 insertion(+) create mode 100644 my_solutions/Day_1 diff --git a/my_solutions/Day_1 b/my_solutions/Day_1 new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/my_solutions/Day_1 @@ -0,0 +1 @@ + From 9701dc537f85e6f06ab2c67bb2fe73dda200f524 Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sat, 22 Nov 2025 21:41:33 +0530 Subject: [PATCH 06/22] day 1 done --- my_solutions/Day_1 | 1 - my_solutions/Day_2 | 171 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 171 insertions(+), 1 deletion(-) delete mode 100644 my_solutions/Day_1 create mode 100644 my_solutions/Day_2 diff --git a/my_solutions/Day_1 b/my_solutions/Day_1 deleted file mode 100644 index 8b13789..0000000 --- a/my_solutions/Day_1 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/my_solutions/Day_2 b/my_solutions/Day_2 new file mode 100644 index 0000000..7e0c31e --- /dev/null +++ b/my_solutions/Day_2 @@ -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; + } +} + + From be1194f52820d290a7c4c0e3c35bee5f3ddbd976 Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sat, 22 Nov 2025 21:42:07 +0530 Subject: [PATCH 07/22] day 3 done --- my_solutions/Day_3 | 118 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 my_solutions/Day_3 diff --git a/my_solutions/Day_3 b/my_solutions/Day_3 new file mode 100644 index 0000000..9adca31 --- /dev/null +++ b/my_solutions/Day_3 @@ -0,0 +1,118 @@ +#1 Merge Sorted Array (LC 88) + +class Solution { + public void merge(int[] nums1, int m, int[] nums2, int n) { + + int i = m - 1, + j = n - 1, + k = m + n - 1; + + while(i >= 0 && j >= 0){ + if(nums1[i] > nums2[j]){ + nums1[k] = nums1[i]; + i--; + }else{ + nums1[k] = nums2[j]; + j--; + } + k--; + } + while (j >= 0) { + nums1[k] = nums2[j]; + j--; + k--; + } + + } +} + +#2 Count Pairs Whose Sum is Less than Target + +class Solution { + public int countPairs(List nums, int target) { + //Optimised -> Two pointers + Collections.sort(nums); + int i = 0, j = nums.size() - 1; + + int pairs = 0; + while(i < j){ + if(nums.get(i) + nums.get(j) < target){ + pairs += j - i; + i++; + }else{ + j--; + } + } + return pairs; + } +} + +#3 Two Sum + +class Solution { + public int[] twoSum(int[] nums, int target) { + HashMap map = new HashMap<>(); + //O(n) + for(int i=0;i O(n) + +#4 Two Sum II - Input Array Is Sorted + +class Solution { + public int[] twoSum(int[] nums, int target) { + int i = 0, j = nums.length - 1; + while(i < j){ + int sum = nums[i] + nums[j]; + if(sum == target) + return new int[]{i+1, j+1}; + else if (sumtarget) k--; + else if(sum equal to target sum + return sum; + } + } + } + return closestSum; + } +} + +Related problems done βœ…: 4Sum(LC 18), 3Sum Closest(LC 16) From c5576722676e3727d259fa20047dbe90a6d6928c Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sat, 22 Nov 2025 21:42:40 +0530 Subject: [PATCH 08/22] day 4 done --- my_solutions/Day_4 | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 my_solutions/Day_4 diff --git a/my_solutions/Day_4 b/my_solutions/Day_4 new file mode 100644 index 0000000..79fef5d --- /dev/null +++ b/my_solutions/Day_4 @@ -0,0 +1,60 @@ +βœ…1 Sort Colors (LC 75) + +class Solution { + public void sortColors(int[] nums) { + //Dutch National Flag Algorithm + //TC -> O(n), SC -> O(1) + int i = 0, j = nums.length - 1, k = 0; + while(k <= j){ + if(nums[k] == 1) k++; + + else if(nums[k] == 2){ + int temp = nums[k]; + nums[k] = nums[j]; + nums[j] = temp; + + j--; + } + else{ + int temp = nums[i]; + nums[i] = nums[k]; + nums[k] = temp; + + k++; i++; + } + } + } +} + +βœ…2 Remove Nth Node From End of List(LC 19) + +class Solution { + public ListNode removeNthFromEnd(ListNode head, int n) { + + ListNode temp = head; + int size = 0; + while(temp != null){ + temp = temp.next; + size++; + } + + if(size == n) + return head.next; + + ListNode dummy = new ListNode(-1); + dummy.next = head; + + ListNode prev = dummy; + ListNode curr = head; + + int prevIdx = 1; + + while(prevIdx <= size - n){ + curr = curr.next; + prev = prev.next; + prevIdx++; + } + prev.next = prev.next.next; + return dummy.next; + } +} From 67517406b3bf0f46ff3570c6213ebfe96b1b8147 Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sun, 23 Nov 2025 19:35:28 +0530 Subject: [PATCH 09/22] day 5 done --- my_solutions/Day_5 | 75 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 my_solutions/Day_5 diff --git a/my_solutions/Day_5 b/my_solutions/Day_5 new file mode 100644 index 0000000..0029848 --- /dev/null +++ b/my_solutions/Day_5 @@ -0,0 +1,75 @@ +#1 Strobogrammatic Number + +import java.util.HashMap; + +public class strobogrammatic_number { + public static boolean checkisStrobogrammatic(String s, HashMap map){ + + int i=0, j=s.length()-1; + + while(i<=j){ //TC : O(N) + char l = s.charAt(i); + char r = s.charAt(j); + + if(!map.containsKey(l)) + return false; + else{ + if(map.get(l) != r) + return false; + else{ + i++; + j--; + } + } + } + return true; + } + public static void main(String[] args) { + String s = "12881"; + HashMap map = new HashMap<>(); + + map.put('0','0'); + map.put('1','1'); + map.put('8','8'); + map.put('6','9'); + map.put('9','6'); + + boolean ans = checkisStrobogrammatic(s, map); + System.out.println(ans); + } + +#2 Append Characters to String to Make Subsequence(LC 2486) + +class Solution { + public int appendCharacters(String s, String t) { + int i = 0, j = 0; + + while(i < s.length() && j < t.length()){ //TC -> O(N) + char sChar = s.charAt(i); + char tChar = t.charAt(j); + + if(sChar != tChar) i++; + else{ + i++; + j++; + } + } + return (j < t.length()) ? t.length() - j : 0; + } +} + +#3 Lowest Common Ancestor of a Binary Tree III(NeetCode, LC premium) +class Solution { + public Node lowestCommonAncestor(Node p, Node q) { + Node p1 = p, + q1 = q; + + while(p1 != q1){ + p1 = (p1==null)? q : p1.parent; + q1 = (q1==null)? p : q1.parent; + } + return p1; + } +} + +} From 7169b87769eec9f31972c89e8207b16323de929f Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sun, 23 Nov 2025 19:37:08 +0530 Subject: [PATCH 10/22] readme updated --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df6a565..ddb0060 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ I update this table daily as I complete each topic. | 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)| βœ… | - +| | Two Pointers – Questions |[Link](https://youtu.be/jA74srakqvI?si=ecv4UgGYbSyz7Tml)| βœ… | (Will be updated daily as the series progresses.) --- From 23a7559674ce87848572f1f09d04df94c7d040d8 Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sun, 23 Nov 2025 19:38:05 +0530 Subject: [PATCH 11/22] .. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ddb0060..1db28d5 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,8 @@ I update this table daily as I complete each topic. | 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)| βœ… | -| | Two Pointers – Questions |[Link](https://youtu.be/jA74srakqvI?si=ecv4UgGYbSyz7Tml)| βœ… | +| 5 | Two Pointers – Questions |[Link](https://youtu.be/jA74srakqvI?si=ecv4UgGYbSyz7Tml)| βœ… | + (Will be updated daily as the series progresses.) --- From 8bbdb7d7e0bbca28ed9b3b7843f6e60251d28946 Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sun, 23 Nov 2025 22:18:11 +0530 Subject: [PATCH 12/22] day 6 done --- my_solutions/Day_6 | 68 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 my_solutions/Day_6 diff --git a/my_solutions/Day_6 b/my_solutions/Day_6 new file mode 100644 index 0000000..d6f99cd --- /dev/null +++ b/my_solutions/Day_6 @@ -0,0 +1,68 @@ +#1 Reverse Words in a String(LC 151) + +//TC -> O(n), SC -> O(1), no use of lib functions +class Solution { + public String reverseWords(String s) { //SPACE OPTIMISED + //trim //" hello world " + int l = 0, r = s.length() - 1; + + while(s.charAt(l) == ' ') l+=1; + + while(s.charAt(r) == ' ') r-=1; + + //append the words in stringbuilder with no duplicate spaces + //"hello world" + // l + // r + StringBuilder sb = new StringBuilder(); + while(l <= r){ + char ch = s.charAt(l); + if(ch != ' '){ + sb.append(ch); + l = l + 1; + }else{ + if(sb.charAt(sb.length() - 1) != ' ') sb.append(' '); + l = l + 1; + } + } + + //sb = "hello world" + //reverse sb + int i = 0, j = sb.length() - 1; + while(i <= j){ + char temp = sb.charAt(i); + sb.setCharAt(i, sb.charAt(j)); + sb.setCharAt(j, temp); + + i = i + 1; + j = j - 1; + } + //sb = "dlrow olleh" + //reverse every word + sb.append(" "); + StringBuilder temp = new StringBuilder(); + StringBuilder ans = new StringBuilder(); + for(i = 0; i < sb.length() ; i++){ + char ch = sb.charAt(i); + if(ch != ' ') + temp.append(ch); + else{ + int st = 0; + int end = temp.length() - 1; + while(st <= end){ + char k = temp.charAt(st); + temp.setCharAt(st, temp.charAt(end)); + temp.setCharAt(end, k); + + st++; end--; + } + ans.append(temp); + if(i != sb.length() - 1) ans.append(" "); + temp.setLength(0); + } + } + return ans.toString(); + } +} + +Related problems done: Reverse String II (LC 541)βœ… From f47eff8fe258463defb851578986706414f445db Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sun, 23 Nov 2025 22:19:10 +0530 Subject: [PATCH 13/22] readme updated --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1db28d5..1d6831a 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ I update this table daily as I complete each topic. | 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)| βœ… | (Will be updated daily as the series progresses.) From ee19f32e4eb8140b5dbfdae8889e0f390fc3c2d5 Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Tue, 25 Nov 2025 01:31:39 +0530 Subject: [PATCH 14/22] readme updated --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c8ef052..370c9ec 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ Each day includes: | 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)| βœ… | (Will be updated daily as the series progresses.) From 704f3eb455eef3807964ce181f5b6359475d548b Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Wed, 26 Nov 2025 17:26:00 +0530 Subject: [PATCH 15/22] day 8 done --- my_solutions/Day_8 | 120 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 my_solutions/Day_8 diff --git a/my_solutions/Day_8 b/my_solutions/Day_8 new file mode 100644 index 0000000..247c320 --- /dev/null +++ b/my_solutions/Day_8 @@ -0,0 +1,120 @@ +#1 Happy Number(LC 202) + +class Solution { + public int sumOfSquares(int n){ + int sum = 0; + while(n > 0){ + int r = n % 10; + sum += r * r; + n = n / 10; + } + return sum; + } + public boolean isHappy(int n) { + int slow = n; + int fast = n; + + while(fast != 1){ + slow = sumOfSquares(slow); + fast = sumOfSquares(sumOfSquares(fast)); + + if(fast == 1) return true; + + if(slow == fast) return false; + } + return true; + } + +#2 Middle of LL(LC 876) + +class Solution { + public ListNode middleNode(ListNode head) { + ListNode slow=head,fast=head; + while(fast!=null && fast.next!=null) + { + slow=slow.next; + fast=fast.next.next; + } + return slow; + } +} + +#3 Linked List Cycle(LC 141) + +public class Solution { + public boolean hasCycle(ListNode head) { + ListNode fast=head; + ListNode slow=head; + while(fast!=null && fast.next!=null){ + slow=slow.next; + fast=fast.next.next; + + if(slow==fast) + return true; + } + return false; + } +} + +#4 Linked List Cycle II (LC 142) + +public class Solution { + public ListNode detectCycle(ListNode head) { + ListNode slow = head; + ListNode fast = head; + + while(fast != null && fast.next != null){ + slow = slow.next; + fast = fast.next.next; + + if(slow == fast){ + slow = head; + while(slow != fast){ + slow = slow.next; + fast = fast.next; + } + return slow; + } + } + return null; + } +} + +#5 Find length of loop in LL (gfg) + +class Solution { + public int lengthOfLoop(Node head) { + // code here + Node slow = head; + Node fast = head; + + while(fast != null && fast.next != null){ + + slow = slow.next; + fast = fast.next.next; + + if(slow == fast){// if cycle exists + // finding starting node + slow = head; + while(slow != fast){ + slow = slow.next; + fast = fast.next; + } + break; + } + } + + if(fast == null || fast.next == null) // no cycle + return 0; + + Node curr = slow.next; + int len = 1; + while(curr != slow){ + curr = curr.next; + len++; + } + return len; + } +} + +} From c1a0470ce29e920676e0157e21bb54c03b6b62cd Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Wed, 26 Nov 2025 17:27:09 +0530 Subject: [PATCH 16/22] readme updated --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 370c9ec..12aacb1 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ Each day includes: | 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)| βœ… | (Will be updated daily as the series progresses.) From 984d5cf2d5f787edcdcc98de2c705f5255c86ba6 Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sun, 30 Nov 2025 01:53:22 +0530 Subject: [PATCH 17/22] day 9 started --- my_solutions/Day_9 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 my_solutions/Day_9 diff --git a/my_solutions/Day_9 b/my_solutions/Day_9 new file mode 100644 index 0000000..198b478 --- /dev/null +++ b/my_solutions/Day_9 @@ -0,0 +1,21 @@ +#Split a Linked List into two halves + +class Solution { + public Pair splitList(Node head) { + // Code here + Node slow = head, fast = head.next; + + while(fast != head && fast.next != head) + { + slow = slow.next; + fast = fast.next; + + if(fast.next != head) + fast = fast.next; + } + fast.next = slow.next; + slow.next = head; + + return new Pair<>(head, fast.next); + } +} From 15ef928e3c42f0b55321707342551b00291f9a64 Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sun, 30 Nov 2025 18:17:40 +0530 Subject: [PATCH 18/22] day 9 done --- my_solutions/Day_9 | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/my_solutions/Day_9 b/my_solutions/Day_9 index 198b478..18bc5bd 100644 --- a/my_solutions/Day_9 +++ b/my_solutions/Day_9 @@ -19,3 +19,67 @@ class Solution { return new Pair<>(head, fast.next); } } + +#2 Find the Duplicate Number(LC 287) + +class Solution { + public int findDuplicate(int[] arr) { + int i = 0; + while(i < arr.length){ + int corrIdx = arr[i] - 1; + if(arr[i] != arr[corrIdx]){ + int temp =arr[i]; + arr[i] = arr[corrIdx]; + arr[corrIdx] = temp; + } + else i++; + } + + for(i = 0 ; i < arr.length ; i++){ + if( i != arr[i] - 1) + return arr[i]; + } + + return -1; + } +} + +#3 Palindrome Linked List + + +class Solution { + public boolean isPalindrome(Node head) { + // code here + // find middle node of ll + Node slow = head; + Node fast = head; + while(fast != null && fast.next != null){ + slow = slow.next; + fast = fast.next.next; + } + Node midNode = slow; + //reverse second half of ll + Node curr = midNode; + Node prev = null; + Node next; + while(curr != null){ + next = curr.next; + curr.next = prev; + prev = curr; + curr = next; + } + + Node left = head; + Node right = prev; + while(right != null){ + if(left.data != right.data) + return false; + + left = left.next; + right = right.next; + } + return true; + } +} + +βœ…βœ…βœ… From c8eadc6eaa878cf64fcff0cff204c1a46276c89f Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sun, 30 Nov 2025 18:19:00 +0530 Subject: [PATCH 19/22] readme updated --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 12aacb1..7f9f9be 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Each day includes: | 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)| βœ… | (Will be updated daily as the series progresses.) --- From 99bf38e0a8b95d85ae09974aa0f3c3ec0cb68fb0 Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sun, 30 Nov 2025 18:20:42 +0530 Subject: [PATCH 20/22] ... --- README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 7f9f9be..c0e5c97 100644 --- a/README.md +++ b/README.md @@ -31,17 +31,16 @@ Each day includes: ## πŸ“… 90-Day Progress Tracker | 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)| βœ… | -(Will be updated daily as the series progresses.) +|:---:|------------------|--------|--------| +| 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) | βœ… | --- From b71370914442548e78b99e7c5e8b9ca0bff44cc8 Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sun, 30 Nov 2025 18:48:53 +0530 Subject: [PATCH 21/22] Add solution for Maximum Twin Sum problem Implement solution for Maximum Twin Sum of a Linked List. --- my_solutions/Day_10 | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 my_solutions/Day_10 diff --git a/my_solutions/Day_10 b/my_solutions/Day_10 new file mode 100644 index 0000000..231de00 --- /dev/null +++ b/my_solutions/Day_10 @@ -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; + } +} From 6c56a28c6bab736a1a7cb27bd09b8624cfae8ae5 Mon Sep 17 00:00:00 2001 From: Sanjana Dutta Date: Sun, 30 Nov 2025 18:51:31 +0530 Subject: [PATCH 22/22] readme updated --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c0e5c97..48d7d98 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,8 @@ Each day includes: | 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) | πŸ”² | --- ## πŸ”— Resources