Day 26/128 of my LeetCode journey 🚀 Today’s problem: Longest Substring Without Repeating Characters Solved it using the sliding window technique with a Set in JavaScript. This approach helped me optimize the solution to O(n) time complexity, making it efficient even for larger inputs. 💡 Key takeaway: Understanding how to dynamically adjust the window when duplicates appear is crucial for mastering string problems like this. Consistency is the real game-changer. Showing up every day, one problem at a time 💪 #LeetCode #128DaysOfCode #JavaScript #CodingJourney #DSA #ProblemSolving
LeetCode Longest Substring Without Repeating Characters in JavaScript
More Relevant Posts
-
🚀 LeetCode Challenge Update: 27/128 Just wrapped up “Container With Most Water” 💧 — a classic two-pointer problem that really tests how you think about optimization. At first glance, it feels like a brute-force problem… but the real magic is in reducing time complexity from O(n²) to O(n) using a smarter approach. 🔑 Key takeaway: Sometimes the best solution isn’t about checking everything — it’s about moving intelligently and eliminating unnecessary work. 📈 Progress: 27/128 Consistency > Motivation #LeetCode #128DaysOfCode #CodingJourney #DSA #JavaScript #ProblemSolving
To view or add a comment, sign in
-
-
JavaScript can surprise you! What will this return? console.log([] == ![]) Most people guess - false But the answer is - true Why? Because JavaScript silently converts types behind the scenes. Lesson: Always understand type coercion — or use === to avoid surprises. #JavaScript #Coding #WebDevelopment #LearnToCode
To view or add a comment, sign in
-
🚀 Day 15/30 – Event Bubbling in JavaScript When an event occurs on an element, it doesn’t just stop there — it bubbles up through its parent elements all the way to the root. 👉 Simply put: Event starts from the target element → moves up to parent → ancestor → document 💡 Example: Clicking a button inside a div will trigger: Button’s event Then the parent div’s event Learn with JavaScript Mastery #Day14 #FrontendDeveloper #JavaScript #InterviewPreparation #WebDevelopment #30DaysChallenge w3schools.com
To view or add a comment, sign in
-
-
🚀 Day 14/30 of My JavaScript Challenge Solved LeetCode 2715 - Timeout Cancellation ✅ 💡 What I Learned Today: ⏳ How setTimeout() delays function execution ❌ How clearTimeout() cancels a scheduled task 🔁 Returning functions from functions (Higher-Order Functions) 🧠 Managing async behavior in JavaScript 📌 Approach: Created a cancellable function that schedules execution using setTimeout(). Then returned a cancelFn which uses clearTimeout() to stop execution before the delay ends. ✨ Key Insight: JavaScript timers can be controlled dynamically, which is useful in search debouncing, API calls, and UI interactions. #JavaScript #LeetCode #30DaysChallenge #WebDevelopment #AsyncJavaScript #CodingJourney #ProblemSolving
To view or add a comment, sign in
-
-
Work in progress 💻 Deep in the code today, building out new functionality for Scrimba Advance JavaScript. Sometimes the best commits are the ones that say "promise" twice because that's exactly what clean, asynchronous code delivers. Those small, focused commits? That's where the real progress happens. 𝖶𝖺𝗇𝗍 𝗍𝗈 𝗅𝖾𝖺𝗋𝗇 coding click 𝗁𝖾𝗋𝖾 👉🏽 : https://shorturl.at/cESup #WebDevelopment #JavaScript #Coding
To view or add a comment, sign in
-
-
🚀 Day 5 of my JavaScript Coding Practice Today’s challenge was all about understanding closures 🔥 Problem: Create a counter function that starts from a given number n and increments by 1 every time it’s called. var createCounter = function(n) { let increment = 0; return function () { let retCount = n + increment; increment++; return retCount; }; }; #JavaScript #Closures #DSA #CodingPractice #100DaysOfCode #FrontendDevelopment
To view or add a comment, sign in
-
-
Ever wondered how JavaScript handles all those asynchronous tasks without freezing up? 🤔 It's all thanks to the magical event loop! This clever mechanism keeps things running smoothly behind the scenes. Think of it like a tireless waiter at a busy restaurant, constantly checking on your requests. ☕️ The call stack handles immediate tasks, while the callback queue waits for those async operations to finish. Then, the event loop zips them back into the call stack for processing! It's a beautiful dance that keeps your web pages interactive. 🕺💃 #JavaScript #EventLoop #WebDevelopment #Coding
To view or add a comment, sign in
-
-
#Day16 Understanding Callback Hell in JavaScript. Today I took on one of the most talked-about challenges in asynchronous JavaScript Callback Hell (also known as the Pyramid of Doom). In my Mentorship for Acceleration backend track, I built a simulated ice cream production process using multiple nested setTimeout callbacks to represent real asynchronous steps in a production line. What is Callback Hell? It occurs when we have multiple asynchronous operations that depend on each other, leading to deeply nested callbacks. While the code works, it becomes extremely difficult to read, debug, and maintain as the number of steps increases. It’s called the Pyramid of Doom because of the visual shape the code creates when you have many nested callbacks. Problems it creates: => Very difficult to read and understand the flow. => Hard to debug (which line belongs to which callback?). => Painful to maintain or add new steps. => Error handling becomes messy. => Code looks ugly and unprofessional. #M4ACELearningChallenge #LearningInPublic #JavaScript #CallbackHell #AsynchronousJavaScript
To view or add a comment, sign in
-
-
Consistency is starting to compound, and Day 59 is proof of that 💻✨ Today’s focus was solving the “string ends with?” problem in JavaScript. It looked simple at first, but it really helped reinforce how built-in methods like endsWith() work under the hood. Also explored an alternative approach using slice()—a great reminder that there’s always more than one way to solve a problem. The biggest learning? Writing clean, readable solutions is just as important as getting the correct output. 🧠 One step closer to mastering problem-solving and strengthening core JavaScript fundamentals 🚀 #100DaysOfCode #JavaScript #CodingJourney #ProblemSolving #WebDevelopment #LearnToCode #Consistency #TechGrowth
To view or add a comment, sign in
-
-
🚀 Day 71 | Practice of All Function Types Today I focused on practicing all types of functions in JavaScript 💻 🔹 What I Worked On: • Practiced function declaration and function expression • Worked with functions using parameters and return values • Revised anonymous functions and arrow functions • Implemented higher-order functions and callbacks • Practiced recursive functions with different examples • Revisited IIFE and object methods 💡 Key Learning: • Practice helps in understanding when to use each type of function • Improved confidence in writing and structuring functions • Better clarity on real-world usage of callbacks and recursion 🔥 Takeaway: 👉 The more you practice functions, the stronger your JavaScript foundation becomes Consistency is turning concepts into skills 🚀 #Day71 #JavaScript #Functions #Practice #ProblemSolving #CodingJourney #10000Coders #FrontendDeveloper #SravanKumarSir
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