Day - 27🚀 📘 DSA Practice: 1️⃣ Reverse Vowels of a String – #345 2️⃣ Two Sum II (Input Array Sorted) – #167 💻 JavaScript Learning: Explored the behavior of the this keyword across different contexts — global scope, objects, functions, and event listeners. Also learned how to use call, apply, and bind to control function context effectively. #100DaysOfCode #JavaScript #DSA #FrontendDevelopment #LearningJourney #CodingDaily #TechGrowth
Practiced DSA and learned JavaScript this keyword behavior
More Relevant Posts
-
DSA Practice — Day 12 Solved the “Max Consecutive Ones” problem on LeetCode 🔢 🧠 Problem: Given a binary array, find the maximum number of consecutive 1s in it. At first glance, the problem looked straightforward — but it still needed clear thinking. I began with a brute-force mindset, then quickly realized it could be done in one pass with simple logic and variables. Approach: • Used two counters — one for the current streak and one for the maximum count. • Incremented when encountering 1s and reset on 0. → Time Complexity: O(n) → Space Complexity: O(1) “Even simple problems teach great lessons when solved with focus.” #DSA #LeetCode #ProblemSolving #JavaScript #LearningInPublic #CodingJourney #BackendDeveloper #100DaysOfCode
To view or add a comment, sign in
-
-
Count the Number of Digits - JavaScript Logic Simplified 👉 Day 24 / Day 93👈 👉 Find how many digits a number has — without converting it to a string? 1️⃣ Handle 0 as a special case — it has 1 digit. 2️⃣ Use Math.abs() to support negative numbers. 3️⃣ Repeatedly divide the number by 10 until it becomes 0, increasing the counter each time. 💡 Example: 👉 23453 → 2345 → 234 → 23 → 2 → 0 ✅ Total digits = 5 #JavaScript #CodingTips #WebDevelopment #FrontendDeveloper #LearnToCode #ProgrammingLogic #CleanCode #ProblemSolving #100DaysOfCode #TechCommunity #CodeNewbie #Algorithms
To view or add a comment, sign in
-
-
Day 23/90 – 90 Days DSA Challenge Today I practiced another classic recursion problem — Sum of first N natural numbers using recursion 💡 🧠 Concept Recap: Recursion is when a function calls itself with a smaller input until it reaches a base condition. It’s like peeling an onion layer by layer — until you reach the core 🧅 ⚙️ Problem Statement: 👉 Write a function sum(n) that calculates the sum of the first n natural numbers. 🧩 Example: Input: 5 Process: 5 + 4 + 3 + 2 + 1 = 15 Output: 15 Time Complexity: O(n) 💾 Space Complexity: O(n) (due to call stack) ✨ Key takeaway: Recursion helps break down complex problems into smaller, simpler ones — it’s elegant, powerful, and mind-opening once you get the hang of it! #Day23 #DSA #Recursion #JavaScript #CodingChallenge #MechCode #LearningInPublic #FrontendDeveloper #CodeEveryday
To view or add a comment, sign in
-
-
DSA Practice — Day 13 Solved the “Missing Number” problem on LeetCode 🔢 🧠 Problem: You’re given an array of n distinct numbers from the range [0…n], and exactly one number is missing. The task: return the missing number. This problem felt very straightforward, but I still didn’t jump into the final code immediately. I first tried a brute-force mindset, explored edge cases, and then moved to a clean mathematical approach without using any built-in JS shortcuts. Approach: • Sum all numbers from 0 to n • Subtract the sum of the array • The difference = missing number → Time Complexity: O(n) → Space Complexity: O(1) “Simple problems become powerful when solved with the right fundamentals.” #DSA #LeetCode #ProblemSolving #JavaScript #LearningInPublic #CodingJourney #BackendDeveloper #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 New Video in our DSA in JavaScript Series! In this video, we start a brand-new chapter — Stack 📚 — one of the most important data structures in DSA! 💻 You’ll learn what a Stack is, how the LIFO (Last In, First Out) principle works, and where stacks are actually used in the real world 🔁 We’ll go through simple examples like Undo/Redo, Browser History, and Function Call Stack — all in a short and beginner-friendly way 👇 💡 You’ll clearly understand: ✅ What is a Stack in DSA ✅ LIFO Principle (Last In, First Out) ✅ Real-life examples of Stack ✅ Applications of Stack in programming ✅ Why Stack is so important in DSA 🎥 Watch here → https://lnkd.in/ggzkXXRs 📌 Watch the complete DSA in JavaScript playlist here: https://lnkd.in/g2qrGaSH 📂 Download the PPT for this topic here: https://lnkd.in/gWV94i3s #dsa #dsainjavascript #javascript #stack #datastructures #codingtutorial #dsaforbeginners #jdcodebase #javascriptdsa #stacktutorial
Stack in JavaScript | DSA Explained with Example | JDCodebase
https://www.youtube.com/
To view or add a comment, sign in
-
DSA Practice — Day 6 Today’s focus was on understanding Time Complexity and Space Complexity — the core of writing efficient algorithms. 🧠 Learned why Big O Notation is used to evaluate performance. ⚙️ Experimented with multiple algorithms to observe how their complexities differ. 📒 Also noted the graphical representation of common Big O complexities in my notebook for quick reference. “Efficiency isn’t about writing less code — it’s about writing code that scales.” #DSA #BigONotation #ProblemSolving #CodingJourney #LearningInPublic #JavaScript #BackendDeveloper
To view or add a comment, sign in
-
🚀Day 85 of #100DaysOfCode 👉 Today I explored the JavaScript Math object. It’s a built-in tool packed with methods for quick math calculations—no setup needed. examples: ▪️Math.ceil(4.6) --> rounds to 5 ▪️Math.floor(4.9) --> rounds down to 4 ▪️Math.pow(2, 3) --> returns 8 ▪️Math.abs(-5) --> returns 5 (gives positive number) Math object makes coding calculations simple and fast. #JavaScript #MathObject #LearnToCode #100DaysOfCode
To view or add a comment, sign in
-
-
DSA Practice — Day 7 Solved the “Remove Duplicates from Sorted Array” problem on LeetCode. 🧩 Approach: • First, understood the problem statement clearly. • Analyzed the given examples and patterns. • Performed a dry run on paper to visualize the algorithm. • Implemented a pointer-based approach to remove duplicates efficiently. “Clarity before code — that’s how you build problem-solving discipline.” #DSA #LeetCode #ProblemSolving #JavaScript #LearningInPublic #CodingJourney #BackendDeveloper
To view or add a comment, sign in
-
-
Syntax Trap #001 Hey there 👋 I've spent a lot of time learning the details of JavaScript and stumbled across lots of surprising gotchas that only became clear after understanding what's going on under the hood. I plan to post one of these each day (or so) and would love to get discussions around the specific "problems". Here's the first: What's the result? const num = '5'; console.log("5" * 4 + num); Error 25 205 55555 Easy, right :) .. said some of my coworkers, before getting it wrong 🤓 https://lnkd.in/g6KefEgc
To view or add a comment, sign in
-
Syntax Trap #001 Hey there 👋 I've spent a lot of time learning the details of JavaScript and stumbled across lots of surprising gotchas that only became clear after understanding what's going on under the hood. I plan to post one of these each day (or so) and would love to get discussions around the specific "problems". Here's the first: What's the result? const num = '5'; console.log("5" * 4 + num); Error 25 205 55555 Easy, right :) .. said some of my coworkers, before getting it wrong 🤓 https://lnkd.in/g6KefEgc
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