NeetCode 20 | LeetCode #567 | Permutation in String Applied sliding window with character frequency tracking to efficiently check for permutations in a string. A great exercise in combining logic, hash maps, and window optimization. #NeetCode #LeetCode #Java #DSA #Algorithms #SlidingWindow #ProblemSolving #CodingJourney
More Relevant Posts
-
NeetCode 19 | LeetCode #424 | Longest Repeating Character Replacement Applied the sliding window technique to find the longest substring after at most k replacements. A great exercise in balancing frequency tracking and window expansion efficiently. #NeetCode #LeetCode #Java #DSA #Algorithms #SlidingWindow #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
NeetCode 14 | LeetCode #11 | Container With Most Water Solved using the two-pointer approach — expanding and shrinking boundaries to find the maximum area efficiently in O(n) time. A great example of how logical movement can outperform brute force. #NeetCode #LeetCode #Java #DSA #Algorithms #TwoPointers #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
NeetCode 18 | LeetCode #3 | Longest Substring Without Repeating Characters Applied the sliding window technique to efficiently track unique characters and find the longest substring in O(n) time. A great exercise in optimizing logic and managing state effectively. #NeetCode #LeetCode #Java #DSA #Algorithms #SlidingWindow #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
NeetCode 21 | LeetCode #76 | Minimum Window Substring Used two pointers and HashMaps to maintain a dynamic window tracking character frequencies. Achieved an optimized O(n) solution with careful window expansion and contraction logic. #NeetCode #LeetCode #Algorithms #Java #DataStructures #Optimization #Coding
To view or add a comment, sign in
-
NeetCode 25 | LeetCode #239 | Sliding Window Maximum Implemented an efficient solution using a deque to track potential maximums within each window. A classic example of optimizing brute force with data structures — achieving O(n) time complexity. #NeetCode #LeetCode #Java #DSA #Deque #SlidingWindow #Algorithms #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
NeetCode 35 | LeetCode #143 | Reorder Linked List This one’s all about mastering pointer manipulation! Steps I followed: 1️⃣ Find the middle using slow & fast pointers 2️⃣ Reverse the second half 3️⃣ Merge both halves alternately Such problems really sharpen understanding of linked list structure and in-place rearrangement. #NeetCode #LeetCode #Java #DSA #LinkedList #Algorithms #CodingJourney #ProblemSolving
To view or add a comment, sign in
-
NeetCode 27 | LeetCode #74 | Search in a 2D Matrix Flattened the 2D matrix logic into a binary search approach for efficient lookup. Treating rows and columns as a single sorted array — achieving O(log(m × n)) time complexity. A neat combination of logic and spatial understanding 🧩 #NeetCode #LeetCode #Java #DSA #BinarySearch #Algorithms #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
📌 Day 18/100 - Valid Palindrome (LeetCode 125) 🔹 Problem: Determine whether a string reads the same forward and backward, ignoring case and non-alphanumeric characters. 🔹 Approach: Implemented a two-pointer technique. Skipped all non-alphanumeric characters. Compared characters from both ends in lowercase. Returned true if all matched, otherwise false. 🔹 Key Learning: Two-pointer method keeps logic clean and efficient. Character handling is key when data isn’t uniform. Time complexity: O(n), Space complexity: O(1). Sometimes, solving elegantly is better than solving fast. ✨ #100DaysOfCode #LeetCode #Java #ProblemSolving #DSA #CodingJourney
To view or add a comment, sign in
-
-
💡 LeetCode #58 — Length of Last Word Today I solved LeetCode Problem 58: Length of Last Word 🧠 Problem Summary: Given a string s consisting of words and spaces, return the length of the last word in the string. A word is defined as a sequence of non-space characters. Key Idea: We can traverse the string from end to start — Skip trailing spaces. Count the number of characters until the next space (which marks the last word). This avoids unnecessary splitting and saves extra space. #LeetCode #Java #DSA #Strings #ProblemSolving #CodingChallenge
To view or add a comment, sign in
-
-
💡 LeetCode #15 — 3Sum Today I solved LeetCode Problem 15: 3Sum 🔍 Problem Summary: Given an integer array nums, return all unique triplets (a, b, c) such that: a + b + c = 0 The solution must not contain duplicate triplets. Key Idea: Use sorting + two pointers to reduce the time from O(n³) to O(n²). Steps: Sort the array. Fix one number (nums[f]) in each iteration. Use two pointers (i and j) to find pairs whose sum equals -nums[f]. Skip duplicates for both the fixed index and the pointer values. This efficiently finds all unique triplets. #LeetCode #Java #DSA #TwoPointers #ProblemSolving #CodingChallenge #Algorithms
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