🌟 Day 50/100 of #100DaysOfCode 🌟 #DrGViswanathanChallenge Halfway through the challenge, and it has been an incredible journey so far! 🚀 Today's focus was on solving the Minimum Indexed Character problem: Given a string str and another string patt, I implemented a function to find the minimum index of a character in str that is also present in patt. Leveraged efficient data structures like hash sets to achieve optimal time complexity. Applied problem-solving strategies to ensure the solution could handle edge cases and large inputs. ✨ Takeaways from the first half: 1. Consistency is key — no matter how small, progress adds up over time. 2 . Breaking complex tasks into smaller steps makes challenges less daunting. 3. The coding community is super supportive, and sharing your journey helps keep the momentum going. Excited for the next 50 days! 🎯 #100daysofcodechallenge #DrGViswanathan #VITBhopal #VITBhopalLion #DrGViswanathanChallenge #drgvishwanathanchallenge #vitbhopal Vellore Institute of Technology (VIT)
Malya Choudha’s Post
More Relevant Posts
-
#Day3 | #drGViswanathanchallenge | #100DaysOfCode Today marks the third day of my 100 Days of Code challenge, inspired by Dr. G Viswanathan. I tackled the problem of finding the subarray with the largest sum in a given integer array and returning its sum. Example: Input: nums = [-2, 1, -3, 4, -1, 2, 1, -5, 4] Output: 6 Explanation: The subarray [4, -1, 2, 1] has the largest sum of 6. Key Concepts Used: Divide and Conquer Solution Approach: The approach used here, divide and conquer, efficiently reduces the number of operations to calculate the maximum sum of a subarray. It brings the time complexity down to O(n log n) with a constant space complexity of O(n). Excited to continue my journey with new challenges every day! #drGViswanathanchallenge #100DaysOfCode #Day3 #CodingJourney #ProblemSolving #Leetcode #vitbhopal Vellore Institute of Technology (VIT)
To view or add a comment, sign in
-
Dear Connections, Today marks the third day of my 100 days of code challenge inspired by Dr.GViswanathan. I tackled the problem of implementing breadth first search approach with using dynamic programming. You are given an m x n matrix board containing letters 'X' and 'O', capture regions that are surrounded: Connect: A cell is connected to adjacent cells horizontally or vertically. Region: To form a region connect every 'O' cell. Surround: The region is surrounded with 'X' cells if you can connect the region with 'X' cells and none of the region cells are on the edge of the board. A surrounded region is captured by replacing all 'O's with 'X's in the input matrix board. Input: board = [["X","X","X","X"],["X","O","O","X"],["X","X","O","X"],["X","O","X","X"]] Output: [["X","X","X","X"],["X","X","X","X"],["X","X","X","X"],["X","O","X","X"]] In the above diagram, the bottom region is not captured because it is on the edge of the board and cannot be surrounded. Example 2: Input: board = [["X"]] Output: [["X"]] Constraints: m == board.length n == board[i].length 1 <= m, n <= 200 board[i][j] is 'X' or 'O'. Vellore Institute of Technology #Day3 #100daysofCode #DrGviswanathanChallenge #vit #leetcode #vitbhopal #codingjourney #problemsolving #coding
To view or add a comment, sign in
-
📅 Day 44 of the #DrGViswanathan 100 Days of Coding Challenge! 🚀 🎯Today, I explored an interesting problem: finding the maximum nesting depth of parentheses in a string. The problem challenges you to determine how deeply nested a valid parentheses string is. 💡 Shriram R, Vellore Institute of Technology #DrGVishwanathanChallenge!#Python#DSA #CodingJourney #LearningEveryday #100DaysOfCodeChallenge #VITBhopal #VITBhopalLion #IbelieveIcanfly
To view or add a comment, sign in
-
"Day 29/100 of #100DaysOfCode: Tackling Duplicate Detection! 🔍🔢 🔑 Key Learnings: 1. Mastered performing operations within the given array without extra space, enhancing memory efficiency. 2. Leveraged the power of indexing to count occurrences, solidifying understanding of array manipulation techniques. 3. Ensured robust solutions by gracefully managing scenarios with no duplicates, returning [-1] as specified. Excited to continue optimizing and refining my coding skills! 💻🚀 #CodingJourney #ArrayManipulation #ProblemSolving #vitbhopal #vitbhopallions #drgvishwanathanchallenge #100daysofcodechallenge #shriramsr
To view or add a comment, sign in
-
🚀 Day 56/100 #100DaysOfCode 🚀 #DrGViswanathanChallenge 🚀 Problem: Given a number n, the task is to return the list of factorial numbers that are smaller than or equal to n. 🔢 Factorial Numbers: Factorial numbers are values obtained by calculating the factorial of a positive integer. #100daysofcodechallenge #DrGViswanathan #VITBhopal #VITBhopalLion #DrGViswanathanChallenge #drgvishwanathanchallenge #vitbhopal #GeekForGeeks Vellore Institute of Technology (VIT)
To view or add a comment, sign in
-
🚀 Day 38/100 of #100DaysOfCode Challenge 🚀 Diving deeper into binary trees with today’s challenge! 🔸 Challenge: Solved the Maximum Depth of Binary Tree problem! 🌲 This task involved calculating the maximum depth of a binary tree. Each day brings new insights and solidifies my coding fundamentals! Shriram R, Vellore Institute of Technology (VIT) #100DaysOfCode #DrGVishwanathanChallenge #C++ #DataStructures #ProblemSolving #BinaryTree #DFS
To view or add a comment, sign in
-
🚀 Day 52/100 of #100DaysOfCode 🚀 #DrGViswanathanChallenge 📚 Today, Geek is diving deep into functions and exploring the difference between pass by value and pass by reference! 💡 In pass by value, the function creates a copy of the variable, while in pass by reference, the function can modify the original variable. Geek is learning how to add 1 to a parameter passed by value and 2 to a parameter passed by reference. ⚙️ It's fascinating to see how function arguments can behave differently, and mastering this concept brings us one step closer to becoming proficient programmers! 💻 Keep coding and stay curious! 💪 #100daysofcodechallenge #DrGViswanathan #VITBhopal #VITBhopalLion #DrGViswanathanChallenge #drgvishwanathanchallenge #vitbhopal #GeekForGeeks Vellore Institute of Technology (VIT)
To view or add a comment, sign in
-
🚀 Day 22 #100DaysOfCode Today, I solved a question string palindrome, uncovering distinct palindromic substrings within a given string. Challenge: Find all distinct palindromic substrings in a string and print them in lexicographical order. Approach: Traversed the string to identify substrings. Checked each substring for palindrome property. Gathered unique palindromes and sorted them. Printed the sorted palindromic substrings. Looking forward to more coding adventures! 💬🔤 #CodingJourney #Day22 Shantanu Pathak AccioJob
To view or add a comment, sign in
-
🌟 #GfG160 Challenge: Day 10/160 🌟 Today’s coding adventure brought me to solving the classic problem Kadane’s Algorithm on GeeksforGeeks! 🚀 🔑 Problem: Find the maximum sum of a contiguous subarray in a given array. 💻 Key Learnings: ✔ Leveraged Dynamic Programming to efficiently track the maximum subarray sum. ✔ Maintained two variables: max for the current subarray sum. res to store the maximum sum encountered so far. ✔ Time Complexity: O(n) — Processed the array in a single loop for optimal performance. 💡 Examples Solved: 1️⃣ Input: arr[] = [2, 3, -8, 7, -1, 2, 3] Output: 11 (Subarray: [7, -1, 2, 3]) 2️⃣ Input: arr[] = [-2, -4] Output: -2 (Subarray: [-2]) ✨ This problem was a great reminder of how simple, yet powerful, dynamic programming concepts can be in optimizing solutions. Grateful to GeeksforGeeks for these incredible challenges and to CHANDIGARH UNIVERSITY for nurturing my coding journey. Every problem solved strengthens my skills in #DSA. Let’s keep the momentum going! 💪 #Day10Of160 #KadaneAlgorithm #DSAChallenge #GeeksforGeeks #CodingJourney #DynamicProgramming #gfg160 #geekstreak2024
To view or add a comment, sign in
-
📅 Day 42 of the #DrGViswanathan 100 Days of Coding Challenge! 🚀 🎯 Today was all about solving a classic problem in stock trading: maximizing profit by buying and selling on the right days! I implemented the solution using a single-pass algorithm, keeping track of the minimum stock price seen so far and calculating potential profits dynamically. 🧮Here's the problem I worked on: Given an array prices where prices[i] is the price of a stock on the ith day, determine the maximum profit from one buy-sell transaction. Shriram R, Vellore Institute of Technology (VIT) #DrGVishwanathanChallenge!#Python #DSA #CodingJourney #LearningEveryday #100DaysOfCodeChallenge #VITBhopal #VITBhopalLion #IbelieveIcanfly
To view or add a comment, sign in