🚀 𝗗𝗮𝘆 𝟭𝟯 𝗼𝗻 𝗟𝗲𝗲𝘁𝗖𝗼𝗱𝗲 Today’s focus was all about mastering sorting and maps in JavaScript two tools that keep showing up everywhere in problem-solving. 🧠 𝗜 𝘀𝗼𝗹𝘃𝗲𝗱: 🔹 344. Reverse String 🔹 977. Squares of a Sorted Array 🔹 242. Valid Anagram 🔹 49. Group Anagrams 💡 𝗞𝗲𝘆 𝘁𝗮𝗸𝗲𝗮𝘄𝗮𝘆: Understanding how sort() and Map() work under the hood makes problems around strings and arrays much easier to tackle. Especially “Group Anagrams” a perfect test for logic and pattern recognition 🧩 #LeetCode #JavaScript #LearnInPublic #BuildInPublic #ProblemSolving #100DaysOfCode #WebDevJourney
Mastering JavaScript sorting and maps with LeetCode challenges
More Relevant Posts
-
💡 JavaScript LeetCode Challenge — Day 19: Longest Common Prefix 🚀 Today’s Challenge: Find the longest common prefix among an array of strings. 🧩 Problem Example: Input: ["flower", "flow", "flight"] Output: "fl" If no common prefix exists, return "". 💭 Key Takeaways: Improved understanding of string manipulation in JavaScript Practiced prefix trimming logic using indexOf() and slice() Every solved problem = better problem-solving muscle 💪 📈 #Day19 #JavaScript #LeetCode #CodingChallenge #100DaysOfCode #WebDevelopment #ProblemSolving #LearningInPublic #CodeNewbie
To view or add a comment, sign in
-
-
Today I practiced one of the classic algorithm problems — implementing the atoi (string to integer) function manually in JavaScript. This problem helps understand: String parsing Handling whitespace and signs Managing integer overflow and boundaries (INT_MAX, INT_MIN) Character to digit conversion using charCodeAt() Here’s a short summary of what my code does: Skips leading spaces Checks for '+' or '-' sign Converts valid numeric characters into an integer Stops at the first invalid character Returns result within 32-bit integer range #JavaScript #CodingChallenge #LeetCode #WebDevelopment #ProblemSolving #LearningJourney
To view or add a comment, sign in
-
-
🚀 𝗗𝗮𝘆 𝟭𝟬 𝗼𝗻 𝗟𝗲𝗲𝘁𝗖𝗼𝗱𝗲 Today’s focus was on mastering one of JavaScript’s most powerful array tools the 𝗳𝗶𝗹𝘁𝗲𝗿() method. 🧠𝗜 𝘀𝗼𝗹𝘃𝗲𝗱: 🔹 2634. Filter Elements from Array 🔹 169. Majority Element 🔹 219. Contains Duplicate II 💡 𝗞𝗲𝘆 𝘁𝗮𝗸𝗲𝗮𝘄𝗮𝘆: 𝗳𝗶𝗹𝘁𝗲𝗿() isn’t just about selecting items , it’s about thinking functionally. It helps you write cleaner, more expressive code while avoiding manual loops. Also... let’s just say “𝗖𝗼𝗻𝘁𝗮𝗶𝗻𝘀 𝗗𝘂𝗽𝗹𝗶𝗰𝗮𝘁𝗲 𝗜𝗜” 𝗺𝗮𝗱𝗲 𝗺𝗲 𝘀𝗾𝘂𝗲𝗲𝘇𝗲 𝗺𝘆 𝗯𝗿𝗮𝗶𝗻 𝗮 𝗹𝗶𝘁𝘁𝗹𝗲 𝗲𝘅𝘁𝗿𝗮 𝘁𝗼𝗱𝗮𝘆 😅 #LeetCode #JavaScript #LearnInPublic #BuildInPublic #ProblemSolving #100DaysOfCode #WebDevJourney
To view or add a comment, sign in
-
-
🚀 Starting My JavaScript Revision Journey! Body: Yesterday, I went back to the basics of JavaScript to strengthen my foundation. Here’s what I revised: 🟡 Variables — var, let, and const and when to use them 🟡 Scope — Global variables (accessible everywhere) — Local variables (accessible within a function/block) 🟡 Data Types — Primitive: string, number, boolean, null, undefined, symbol, bigint — Non-Primitive: objects, arrays, functions It’s amazing how revisiting fundamentals clears a lot of confusion! What JavaScript concept took you time to understand when starting out? #JavaScript #BackendDevelopment #LearningJourney #Coding
To view or add a comment, sign in
-
Building a Basic Calculator in JavaScript 🔹 Ever wondered how to evaluate a math expression like '1 + (4 + 5 + 2) - 3' in JavaScript without using eval()? Here's a clean way to do it using stacks. Key Concepts: Stack for previous results and signs: Keeps track of nested parentheses. Sign management: Helps handle + and - correctly. Iterative parsing: Converts string digits into numbers. Avoids the dangers of eval(). Can handle nested parentheses. Shows how stack-based algorithms can solve real-world problems elegantly.
To view or add a comment, sign in
-
-
🚀 Day 5 of My 30 Days of JavaScript Challenge 🧩 Problem: Apply Transform Over Each Element in Array (LeetCode #2635) Given an integer array arr and a mapping function fn, return a new array such that: newArray[i] = fn(arr[i], i) Solve this without using the built-in Array.map() method. 💻 Language: JavaScript ❓ Question: https://lnkd.in/eq8qYfpb 💡 Solution: https://lnkd.in/eT5U2kBp 🧠 Concepts Used: Higher-order functions (passing functions as arguments) Loops and callback functions Core idea behind how .map() works internally 📚 Takeaway: By recreating the Array.map() method manually, I learned how callback execution and array transformations work under the hood — a must-know for mastering JavaScript fundamentals. #Day5 #JavaScript #30DaysOfCode #LeetCode #CodingChallenge #WebDevelopment #FrontendDevelopment #100DaysOfCode
To view or add a comment, sign in
-
💻 JavaScript Conditional Statements (If-Else, Else If, Switch & Ternary) In today’s practice, I explored how JavaScript makes decisions using conditional statements. These help programs respond differently based on input or conditions — just like real-life choices! 🌟 🧩 Covered Concepts: ✅ If–Else: Checking even/odd numbers, eligibility, positive/negative, passwords, divisibility 🧠 Else–If Ladder: Grades, largest number, months, temperature, character types 🔁 Switch Case: Days, seasons, calculator, traffic lights, grades ⚡ Ternary Operator: Quick checks for positivity, largest number, leap year, pass/fail, and case 💬 Practicing these statements improved my logic-building and problem-solving skills in JavaScript! #JavaScript #WebDevelopment #CodingPractice #FrontendDevelopment #LearnToCode #ProgrammingJourney
To view or add a comment, sign in
-
🚀 New Video in our DSA in JavaScript Series! In this video, we continue our Stack chapter 📚 — and solve two very popular stack problems in JavaScript 💻 You’ll learn step-by-step how to: ✅ Reverse a String using Stack ✅ Check for Balanced Parentheses (Brackets) Both are beginner-friendly but super important problems to understand how LIFO (Last In, First Out) works in real coding examples ⚙️ We’ll go through the full logic + code explanation and dry run everything inside VS Code 👇 💡 You’ll clearly understand: How Stack helps in Reversal & Matching problems Real use of push() and pop() How LIFO principle solves both questions Step-by-step dry run examples 🎥 Watch here → https://lnkd.in/etXYgrSp 📌 Watch the complete DSA in JavaScript playlist here: https://lnkd.in/g2qrGaSH 📂 Download the PPT for this topic here: https://lnkd.in/eejEhC3j #dsa #dsainjavascript #javascript #stack #datastructures #codingtutorial #dsaforbeginners #jdcodebase #javascriptdsa #stacktutorial
Stack Problems Part-1 in JavaScript | DSA Explained with Example | JDCodebase
https://www.youtube.com/
To view or add a comment, sign in
-
Think newlines are just for formatting? Cute. Pros know JavaScript’s “helpful” automatic semicolon will stab you in the back. Write `return\n{ user: name }` and your function silently returns `undefined`. The newline makes JS see it as `return;`. Is this a handy feature for lazy coders or the most insidious bug-generator in the language? #GaboTips #JSWeirdness
To view or add a comment, sign in
-
Day 25/90 – 90 Days DSA Challenge Today I learned how to find the factorial of a number using recursion in JavaScript 💡 🧠 Concept Recap: Recursion is a process where a function calls itself to solve smaller subproblems. In the case of factorial, we multiply the number by the factorial of the previous number until we reach 1. ⚙️ Problem Statement: 👉 Write a recursive function fact(n) that returns the factorial of a number n. 🧩 Example: Input: 5 Process: 5 * 4 * 3 * 2 * 1 Output: 120 Time Complexity: O(n) 💾 Space Complexity: O(n) (recursive call stack) ✨ Key Takeaway: Recursion simplifies problems like factorial by breaking them down into smaller, repeatable steps — clean, simple, and powerful! 🚀 #Day25 #90DaysDSAChallenge #Recursion #JavaScript #ProblemSolving #Factorial #MechCode #LearningInPublic #FrontendDeveloper #CodeEveryday
To view or add a comment, sign in
-
Explore related topics
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