🌟 Day 49 of my GFG Streak! 🌟 Today, I solved "Count All Triplets with Given Sum in a Sorted Array" using the two-pointer technique. This problem sharpened my skills in handling duplicates and optimizing for sorted arrays, all while maintaining O(n2)O(n^2) complexity. Feeling proud of the progress and excited to keep the streak alive! 🚀 #CodingJourney #GFGStreak #ProblemSolving #KeepLearning #gfg160 #geekstreak2024
Sarath Patruni’s Post
More Relevant Posts
-
🔥 Day 4: The #gfg160 Challenge Rolls On! 🔥 Today’s challenge: Rotate an array to the left (counter-clockwise) by d steps in place. 🔄 👉 Handling rotations efficiently while keeping the array unsorted adds an exciting twist to problem-solving! ✅ Another step forward in this daily streak. Let’s discuss—how would you approach this? Share your ideas below! 👇 #GeekStreak2024 #CodingChallenge #DailyCoding #ProblemSolving
To view or add a comment, sign in
-
Day 19 of GfG 160 Challenge Todays Qn: Min characters to add for Palindrome. In this question we have to add characters in the start of a word to make it palindrome. #gfg160 #geekstreak2024 #geeksforgeeks
To view or add a comment, sign in
-
Day 27/160 of gfg streak 🤓 Problem : Search in Rotated Sorted Array ✅ Difficulty Level : Medium 💪 Method Used : Using Binary Search the key is checked in which sorted division it is placed , further using conditional loops the section is compressed until the key is reached and the final condition to return the output is given as 1️⃣ ==> if(key ==arr[mid]) return mid . 2️⃣ ==> If there is no key found then it returns -1; #gfg160 #geekforgeeks #geekstreak #geekstreaks #160DaysOfCode
To view or add a comment, sign in
-
🔄 Day 20 - GFG 160 Challenge 🔄 Today’s challenge was Strings Rotations of Each Other! This problem highlighted the importance of understanding string properties and rotations, showcasing how simple concepts can lead to elegant solutions. Looking forward to Day 21 for more exciting challenges! 🚀 #GeeksforGeeks #geekstreak2024 #GFG160 #CodingChallenge #StringRotations #CompetitiveProgramming #LearningJourney
To view or add a comment, sign in
-
🚀 Day 3 of 160: Reversing an Array with Two-Pointers! 💡 Here’s what I learned: The two-pointer technique is a game-changer for in-place array reversal. By swapping elements from both ends and moving inward, I achieved (O(n)) time complexity with zero extra space! ✅ Day 3 streak #DSAChallenge #CodingJourney #gfg160 #geekstreak2024 #ProblemSolving #LearnAndGrow #womenintech
To view or add a comment, sign in
-
🌟GfG 160 - 160 Days of Problem-Solving Journey! ✨ 🚀 Day 17/160 - Non-Repeating Character What I Learned Today: Worked on finding the first non-repeating character in a string, tackling the "Non-Repeating Character" problem effectively. Key Takeaways: Utilized a frequency map (or array) to count occurrences of each character in the string. Iterated through the string to identify the first character with a count of 1, ensuring an efficient solution. Handled cases where there might be no non-repeating characters by returning '$', with the understanding that it prompts the driver code to output -1. Focused on maintaining linear time complexity O(n) and minimizing space usage. #gfg160 #geekstreak2024 GeeksforGeeks
To view or add a comment, sign in
-
🚀 Day 19 of #GfG160 -160 Days of Problem-Solving Challenge!! 🔴 A Tough problem on strings — Min Chars to Add for Palindrome. The optimal solution in based on the KMP String matching algorithm using a LPS(Longest Prefix Suffix) array. Loving this journey of daily problem-solving with GeeksforGeeks. Let’s keep the #GeekStreak2024 alive! 💻🔥 #CodingChallenge #DSA #ProblemSolving
To view or add a comment, sign in
-
🎉 Day 9 of #GFG160DaysChallenge Completed! 🎉 🚀 I successfully solved today's problem: Question: Given a string s, the task is to find the minimum characters to be added at the front to make the string a palindrome. Solution : I concatenated the reverse of the string with the given string and used the longest prefix suffix (LPS) array to track how many characters are matching. Then, I subtracted the LPS value of the last character of the concatenated string from the length of the given string. Feeling accomplished and ready for Day 10! 🚀 #GFG #GFG160 #WomenInTech #GeekStreak2024
To view or add a comment, sign in
-
🚀 𝐆𝐟𝐆 160 𝐃𝐚𝐲𝐬 𝐨𝐟 𝐏𝐫𝐨𝐛𝐥𝐞𝐦 𝐒𝐨𝐥𝐯𝐢𝐧𝐠 - 𝐃𝐚𝐲 10 𝐓𝐨𝐝𝐚𝐲'𝐬 𝐜𝐡𝐚𝐥𝐥𝐞𝐧𝐠𝐞: 𝐌𝐢𝐧 𝐂𝐡𝐚𝐫𝐬 𝐭𝐨 𝐀𝐝𝐝 𝐟𝐨𝐫 𝐏𝐚𝐥𝐢𝐧𝐝𝐫𝐨𝐦𝐞 🔄💡 Worked on an elegant solution using the Longest Prefix Suffix (LPS) array from the KMP algorithm to find the minimum characters required to make a string a palindrome. 🧠💻 This approach not only boosts problem-solving skills but also optimizes time complexity for string manipulation! 🌟 Onward to the next challenge! 💪🔥 hashtag #gfg160 #geekstreak2024 #womenintech
To view or add a comment, sign in
-
🎯 Day 36 of my GFG Streak Journey 🎯 Today's challenge: Search in a Row-Column Sorted Matrix 🧩 I approached this problem using a simple and efficient searching algorithm. It's exciting to tackle problems like these, as they push me to think logically and keep improving my problem-solving skills. The journey continues, and I’m determined to maintain this streak consistently! 💪✨ #CodingJourney #GeeksForGeeks #ConsistencyIsKey #ProblemSolving #gfg160 #geekstreak2024
To view or add a comment, sign in