Skip to content

Sangram03/160DaysGFG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“œ Table of Contents ๐Ÿ“œ

For discussions, questions, or doubts related to this solution, please visit my Twitter : Any Questions. Thank you for your input, together, we strive to create a space where learning is a collaborative endeavor.

๐Ÿ”ฎYour feedback is valuable! Please consider leaving a ๐ŸŒŸ star ๐ŸŒŸ and sharing your thoughts in the comments.

Introduction ๐Ÿ™‚

This repository contains solutions to daily problems from GeeksforGeeks. Each day, a new problem is provided along with its solution.

๐Ÿ“… January 2025 Problem of the Day Solutions ๐Ÿ“…

January Problem Name Java โ˜•
Day 01 Print Anagrams Together ๐Ÿ’ฅ๐Ÿ”ข Solution
Day 02 Subarrays with sum K ๐Ÿ“Š๐Ÿ”ข Solution
Day 03 Count Subarrays with given XOR ๐Ÿ”ข๐ŸŒŸ Solution
Day 04 Count all triplets with given sum in sorted array ๐Ÿงฉ๐Ÿ“ƒ Solution
Day 05 Count Pairs whose sum is less than target ๐Ÿ“๐Ÿ“ Solution
Day 06 Sum Pair closest to target ๐Ÿ’ฅ๐Ÿ“Š๐Ÿ”ข Solution
Day 07 Pair with given sum in a sorted array ๐Ÿ’ฅ๐Ÿ“Š๐Ÿ”ข Solution
Day 08 Count the number of possible triangles ๐Ÿ”ข๐ŸŒŸ Solution
Day 09 Indexes of Subarray Sum ๐Ÿงฉ๐Ÿ“ƒ Solution
Day 10 Count distinct elements in every window ๐Ÿ“๐Ÿ“ Solution
Day 11 Longest substring with distinct characters ๐Ÿ’ฅ๐Ÿ“Š๐Ÿ”ข Solution
Day 12 Trapping Rain Water ๐Ÿ’ฅ๐Ÿ“Š๐Ÿ”ข Solution

๐ŸŽ‰ Bonus Problems (Arrays)๐ŸŽ

Bonus Problem No. Problem Name Java โ˜•
NUM 1 Split Array in Three Equal Sum Subarrays ๐Ÿ’ฅ Solution
NUM 2 Repetitive Addition of Digits ๐Ÿ”ข๐Ÿ”„ Solution
NUM 3 Maximize Number of 1's ๐Ÿ”ข๐Ÿ’ก Solution
NUM 4 Last Moment Before All Ants Fall Out of a Plank ๐Ÿœ๐ŸŒ Solution

๐ŸŽ‰ Bonus Problems (Strings)๐ŸŽ

Bonus Problem No. Problem Name Java โ˜•
NUM 1 Fizz Buzz ๐Ÿ’ฅ๐Ÿ”ข Solution
NUM 2 CamelCase Pattern Matching ๐Ÿš€๐ŸŸฐ Solution
NUM 3 Palindrome Sentence โœ…๐Ÿ‘‘ Solution
NUM 4 Minimum repeat to make substring ๐Ÿš€โœ… Solution
NUM 5 Longest Prefix Suffix ๐Ÿ”ข๐ŸŸฐ Solution
NUM 6 Integer to Words ๐Ÿ’ฅ๐Ÿš€ Solution

๐Ÿ“ Bonus Problems (Sorting)๐Ÿ“

Bonus Problem No. Problem Name Java โ˜•
NUM 1 Minimum sum โž•๐Ÿ“Š Solution
NUM 2 Meeting Rooms ๐Ÿข๐Ÿ“… Solution
NUM 3 From the Largest Number ๐Ÿ”ข๐Ÿ† Solution
NUM 4 Make array elements unique ๐ŸŽฒ๐Ÿ”ง Solution

๐ŸŽ‰ Bonus Problems (Searching)๐ŸŽ

Bonus Problem No. Problem Name Java โ˜•
NUM 1 Implement Lower Bound ๐Ÿ’ฅ๐Ÿ”ข Solution
NUM 2 Bitonic Point ๐Ÿš€๐ŸŸฐ Solution
NUM 3 Median of 2 Sorted Arrays of Different Sizes โœ…๐Ÿ‘‘ Solution
NUM 4 Square Root ๐Ÿš€โœ… Solution
NUM 5 Koko Eating Bananas ๐Ÿ”ข๐ŸŸฐ Solution
NUM 6 Minimum days to make M bouquets ๐Ÿ’ฅ๐Ÿš€ Solution

๐ŸŽ‰ Bonus Problems (Matrix)๐ŸŽ

Bonus Problem No. Problem Name Java โ˜•
NUM 1 Rotate a Matrix by 180 Counterclockwise ๐Ÿ’ฅ๐Ÿ”ข Solution
NUM 2 Create a spiral matrix of N*M size from given array ๐Ÿš€๐ŸŸฐ Solution
NUM 3 Generate a matrix with each row and column of given sum โœ…๐Ÿ‘‘ Solution
NUM 4 Make Matrix Beautiful ๐Ÿš€โœ… Solution

๐ŸŽ‰ Bonus Problems (Hashing)๐ŸŽ

Bonus Problem No. Problem Name Java โ˜•
NUM 1 Roman Number to Integer ๐Ÿ’ฅ๐Ÿ”ข Solution
NUM 2 Max distance between same elements ๐Ÿš€๐ŸŸฐ Solution
NUM 3 Pairs with difference k โœ…๐Ÿ‘‘ Solution
NUM 4 4 Sum โ€“ Count quadruplets with given sum ๐Ÿš€โœ… Solution
NUM 5 Min Subsets with Consecutive Numbers ๐Ÿ”ข๐ŸŸฐ Solution
NUM 6 Group Shifted String ๐Ÿ’ฅ๐Ÿš€ Solution

๐ŸŽ‰ Bonus Problems (Two Pointer Technique)๐ŸŽ

Bonus Problem No. Problem Name Java โ˜•
NUM 1 Triplet Sum in Array ๐Ÿ’ฅ๐Ÿ”ข Solution
NUM 2 3 Sum Closest ๐Ÿš€๐ŸŸฐ Solution

๐ŸŽ‰ 160 Days of GFG Challenge ๐ŸŽ


Here's the updated list with the problem days properly formatted in the solution folder:

Day Problem Name Java โ˜•
Day 1 Second Largest ๐Ÿ”ข๐Ÿ… Solution
Day 2 Move All Zeroes to End ๐Ÿ”„0๏ธโƒฃ Solution
Day 3 Reverse an Array ๐Ÿ”„๐Ÿ” Solution
Day 4 Rotate Array ๐Ÿ”„๐Ÿ”„ Solution
Day 5 Next Permutation ๐Ÿ”ข๐Ÿ”„ Solution
Day 6 Majority Element II ๐Ÿ”ข๐Ÿ‘ฅ Solution
Day 7 Stock Buy and Sell โ€“ Multiple Transactions Allowed ๐Ÿ“ˆ๐Ÿ’น Solution
Day 8 Stock Buy and Sell โ€“ Max One Transaction Allowed ๐Ÿ“‰๐Ÿ’ต Solution
Day 9 Minimize the Heights II โฌ†๏ธโฌ‡๏ธ Solution
Day 10 Kadane's Algorithm ๐Ÿ’ก๐Ÿ“Š Solution
Day 11 Maximum Product Subarray ๐Ÿ”ข๐Ÿ’ฅ Solution
Day 12 Max Circular Subarray Sum ๐Ÿ”๐Ÿ’ฏ Solution
Day 13 Smallest Positive Missing Number ๐Ÿ”ขโ“ Solution
Day 14 Implement Atoi ๐Ÿ”ข๐Ÿ’ป Solution
Day 15 Add Binary Strings 0๏ธโƒฃ1๏ธโƒฃโž• Solution
Day 16 Anagram ๐Ÿ”„โœ๏ธ Solution
Day 17 Non Repeating Character ๐Ÿ” โŒ Solution
Day 18 Search Pattern (KMP Algorithm) ๐Ÿ”๐Ÿ“œ Solution
Day 19 Min Chars to Add for Palindrome ๐Ÿ”๐Ÿ“• Solution
Day 20 Strings Rotations of Each Other ๐Ÿ”๐Ÿ“ƒ Solution
Day 21 Sort 0s, 1s and 2s ๐Ÿ“ƒ๐Ÿ“ Solution
Day 22 Find H-Index ๐Ÿ”๐Ÿ” Solution
Day 23 Count Inversions ๐Ÿ˜€ ๐Ÿงก Solution
Day 24 Overlapping Intervals ๐Ÿ”ฉโš™๏ธ Solution
Day 25 Insert Interval๐ŸŒธ ๐Ÿ’Ž Solution
Day 26 Non-overlapping Intervals๐Ÿ“๐Ÿ“ Solution
Day 27 Merge Without Extra Space๐Ÿฉนโ›“๏ธ Solution
Day 28 Number of occurrence๐Ÿงพ๐Ÿท๏ธ Solution
Day 29 Sorted and Rotated Minimumโค๏ธ ๐ŸŒบ Solution
Day 30 Search in Rotated Sorted Array๐Ÿ”ฎ ๐Ÿ˜ƒ Solution
Day 31 Peak element๐Ÿ’Ž ๐Ÿงก Solution
Day 32 K-th element of two Arraysโญ๐Ÿ’ซ Solution
Day 33 Aggressive Cows๐Ÿ”ฅโ˜˜๏ธ Solution
Day 34 Allocate Minimum Pages๐Ÿ“„๐Ÿ“„ Solution
Day 35 Kth Missing Positive Number in a Sorted Array๐Ÿ“œ๐Ÿ”ข Solution
Day 36 Spirally traversing a matrix๐ŸŽฏ๐Ÿ”ข Solution
Day 37 Rotate by 90 degree๐Ÿจ๐Ÿข Solution
Day 38 Search in a Row-Column sorted matrix๐ŸŽฏ๐Ÿ”ข Solution
Day 39 Search in a row-wise sorted matrixโœ…๐Ÿ•– Solution
Day 40 Search in a sorted matrix๐Ÿ› ๏ธ๐Ÿ“‘ Solution
Day 41 Set matrix Zeroes๐Ÿ“„๐Ÿ“จ Solution
Day 42 Two Sum -Pair with Given Sum๐Ÿ…๐Ÿ“ฆ Solution
Day 43 Count pairs with given sum ๐Ÿ”ข๐Ÿงฎ Solution
Day 44 Find All Triplets with Zero Sum๐Ÿ“๐Ÿ–Š๏ธ Solution
Day 45 Intersection of Two arrays with Dublicate Elements๐Ÿ“•โœ๏ธ Solution
Day 46 Union of Arrays with Duplicates๐Ÿ“š๐Ÿ“ฆ Solution
Day 47 Longest Consecutive Subsequenceโž•๐Ÿ—ฏ๏ธ Solution
Day 48 Print Anagrams Together๐Ÿงฉ๐ŸŽฏ Solution
Day 49 Subarrays with sum K๐Ÿ› ๏ธ๐Ÿ“‘ Solution
Day 50 Count Subarrays with given XOR๐Ÿ–Š๏ธ๐Ÿ“ Solution
Day 51 Count all triplets with given sum in sorted array๐Ÿงฉ๐Ÿ“ƒ Solution
Day 52 Count Pairs whose sum is less than target๐Ÿ“๐Ÿ“ Solution
Day 53 Sum Pair closest to target๐Ÿ“šโœ๏ธ Solution
Day 54 Pair with given sum in a sorted array๐Ÿ“•๐Ÿ–Š๏ธ Solution
Day 55 Count the number of possible triangles๐Ÿ“‘โœ’๏ธ Solution
Day 56 Indexes of Subarray Sum๐Ÿ“˜๐Ÿ“ Solution
Day 57 Count distinct elements in every window๐Ÿ“๐Ÿ“š Solution
Day 58 Longest substring with distinct characters๐Ÿ“™๐Ÿ–‹๏ธ Solution
Day 59 Trapping Rain Water๐Ÿ“‘โœ’๏ธ Solution