Day 18 of #100DaysOfCode 🚀 📌 Problem: Isomorphic Strings (LeetCode) 💡 Key Learning: ▪️Two strings are isomorphic if there’s a one-to-one character mapping that stays consistent throughout. 🔍 What I focused on today: ▪️Using HashMap to store character mappings ▪️Ensuring no two characters map to the same value ▪️Understanding the importance of correct if–else structure ▪️Why checking string length first matters ▪️How small logical mistakes can break the entire solution 🧠 Biggest takeaway: Correct logic flow matters more than just writing code that compiles. Consistent practice, clearer logic, and better problem-solving—one day at a time 💪 #Day18 #LeetCode #DSA #Java #ProblemSolving #Consistency #LearningInPublic
Isomorphic Strings LeetCode Challenge
More Relevant Posts
-
Day 3 – LeetCode 151: Reverse Words in a String Description: Day 3 of consistent problem-solving. Solved LeetCode 151 – Reverse Words in a String. This problem looks simple, but it tests real fundamentals: Handling extra spaces Correct string traversal Understanding how words are actually separated Writing clean logic instead of relying blindly on library shortcuts Key takeaway: If you can’t control whitespace and edge cases, you don’t really understand strings. Consistency > difficulty. One solid problem a day is better than pretending to “grind” and quitting in a week. #LeetCode #Day3 #DSA #StringProblems #ProblemSolving #Java #CodingJourney #Consistency
To view or add a comment, sign in
-
LeetCode Grinding 🚀 Today was focused on strengthening Two Pointers mastery and improving problem-solving speed through practice. 🔹 DSA & LeetCode Practice Solved multiple problems by applying the Two Pointers pattern: LeetCode 11 — Container With Most Water Learned how pointer movement helps maximize area efficiently LeetCode 125 — Valid Palindrome Applied two pointers for string validation after preprocessing LeetCode 2824 — Count Pairs Whose Sum is Less than Target Understood how sorted arrays + two pointers help count pairs efficiently LeetCode 26 — Remove Duplicates from Sorted Array Strengthened in-place array manipulation using pointer technique 📌 Key takeaway: The Two Pointers pattern is powerful for: Sorted arrays Pair problems String validation Space-optimized solutions The more I practice patterns, the faster I recognize where to apply them. #DailyGrind #DSA #LeetCode #TwoPointers #ProblemSolving #Java #Consistency #LearningInPublic #InterviewPrep
To view or add a comment, sign in
-
Day 11 of my #LeetCodeDailyChallenge Today’s problem: Valid Parentheses Topic: Stack | Strings Difficulty: Easy In this problem, I practiced using a stack data structure to validate whether brackets in a string are properly opened and closed. It strengthened my understanding of how Last-In-First-Out logic helps track matching pairs efficiently and detect invalid sequences early. Key learnings: Practical use of stack for pattern validation Importance of mapping pairs correctly Writing clean conditional logic for edge cases Daily consistency is helping me improve both problem-solving speed and coding clarity. #DSA #Java #CodingJourney #ProblemSolving #LearningInPublic
To view or add a comment, sign in
-
Day 5/60 – LeetCode Challenge 🔥 Problem: Contains Duplicate (LeetCode 217) Today’s concept: Hashing 💡 The question is simple: Given an array, return true if any value appears at least twice. Brute force approach? Compare every pair → O(n²) ❌ Better approach? Use a HashSet. Intuition: As I traverse the array: • Add the element to the set if it return false this means element already exist in the set -> just return true • Otherwise → return false Why this works? Because a HashSet allows O(1) average time complexity for lookup. So instead of comparing every element, we just check if we’ve seen it before. Time Complexity: O(n) Space Complexity: O(n) Key Learning: When the question involves: “Check if element already exists” or “Detect duplicates” Think → Hashing Day 5 completed ✅ On to Day 6 🚀 #LeetCode #DSA #Hashing #Java #CodingChallenge #PlacementPreparation
To view or add a comment, sign in
-
-
Day 67 of #100DaysOfCode Today I solved the classic Permutations problem using Backtracking (Swap Method). At first glance, it feels like we just need to “rearrange” numbers — but the real learning is understanding how recursion explores every possible arrangement systematically. 🔁 The key idea: Fix one position → try every element → recurse for the next position → backtrack. This pattern (choose → explore → undo) is the backbone of many advanced problems like: Subsets Combinations N-Queens Sudoku Solver 📌 Time Complexity: O(n!) 📌 Space Complexity: O(n) (excluding result storage) The biggest takeaway? Backtracking is not about memorizing code — it’s about mastering the decision tree in your mind. One more step forward. 🚀 #100DaysOfCode #DSA #Backtracking #Java #ProblemSolving #dsawithkunal
To view or add a comment, sign in
-
-
🚀 Continuing My #100DaysChallenge Today, I solved the LeetCode problem: “Max Consecutive Ones” ✅ This problem was a great practice for: • Traversing arrays efficiently • Maintaining counters and tracking maximum values • Thinking about patterns in sequences It improved my understanding of how simple logic can solve real problems when applied correctly. Solving one problem daily is slowly building my confidence in DSA and Java 💪 Consistency is starting to show results. 📌 Tip for beginners: Focus on logic building — even basic array problems sharpen your thinking. #100DaysChallenge #LeetCode #Java #CodingJourney #DSA #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
🚀 Day 35 of 50 Days of Code on LeetCode 🚀 Today I worked on a problem that highlighted the importance of ordering data correctly to uncover optimal solutions—finding all pairs with the minimum absolute difference in an array of distinct integers. 🔍 Approach: • Sorted the array to ensure proper ordering • Compared adjacent elements to identify the minimum absolute difference • Collected all pairs matching this minimum difference • Returned the pairs in ascending order automatically 💡 Key Learnings: • The closest values in a dataset often appear after sorting • Minimum absolute differences are found between adjacent elements • Preprocessing steps like sorting are crucial for correctness • Clean logic improves both efficiency and readability ⚙️ Complexity: Time: O(n log n) Space: O(1) (excluding output) This problem reinforced how a simple preprocessing step can transform a problem into an elegant and interview-ready solution. Continuing to build strong DSA fundamentals in Java 🚀 #Day35 #50DaysOfCode #LeetCode #Java #DSA #ProblemSolving #Algorithms #CodingJourney #PlacementPreparation #LearningByDoing
To view or add a comment, sign in
-
-
Day 55 of #100DaysOfCode 🚀 Today I worked on a classic yet powerful problem: Sort Characters by Frequency. 💡 Key learning: Instead of sorting characters directly (which costs O(n log n)), we can use Bucket Sort to group characters by their frequency and build the result efficiently. 🔹 Count character frequencies using a HashMap 🔹 Use frequency as bucket index 🔹 Build the string from highest to lowest frequency ✅ Result: Optimal O(n) time complexity This problem reinforced an important lesson for me: Choosing the right data structure can completely change the efficiency of a solution. Slowly but steadily improving problem-solving clarity and optimization thinking. 💪 On to the next challenge tomorrow 🔥 #100DaysOfCode #Day55 #DSA #ProblemSolving #Java #CodingJourney #LearningEveryday #dsawithkunal
To view or add a comment, sign in
-
-
🚀 Day 7 of #100DaysOfCode Solved Search a 2D Matrix on LeetCode using an optimized matrix traversal approach 🔎 🧠 Key insight: Since rows and columns are sorted, starting from the top-right corner helps eliminate either a row or a column in each step. ⚙️ Approach: 🔹Start at top-right element 🔹If value < target → move down 🔹If value > target → move left 🔹Repeat until target is found or bounds are crossed ⏱️ Time Complexity: O(m + n) 📦 Space Complexity: O(1) #100DaysOfCode #LeetCode #DSA #Matrix #Java #ProblemSolving #LearningInPublic #CodingJourney
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development