Day 1 of improving my problem-solving skills 🚀 Tried solving Two Sum today. Logic was clear… implementation humbled me 😅 Got stuck not because of approach, but something basic — hashmap syntax. 👉 Today’s learning: Using a hashmap (Map in JS) reduces time complexity from O(n²) → O(n) Knowing syntax matters as much as knowing the idea Most used Map functions: set(key, value) get(key) has(key) Small steps, consistent effort 📈 #DSA #JavaScript #Fullstack #LearnInPublic
Two Sum Problem Solving with Hashmap in JavaScript
More Relevant Posts
-
𝐃𝐚𝐲 𝟔/𝟑𝟎 🚀 𝐓𝐨𝐝𝐚𝐲 𝐈 𝐥𝐞𝐚𝐫𝐧𝐞𝐝: Generating random values and working with strings in JavaScript 𝐁𝐮𝐢𝐥𝐭: A password generator that creates random passwords using letters, numbers, and symbols 𝐊𝐞𝐲 𝐭𝐚𝐤𝐞𝐚𝐰𝐚𝐲: Used loops and random indexing to build a dynamic string generator #30DaysChallenge #WebDev #LearningInPublic
To view or add a comment, sign in
-
𝐃𝐚𝐲 𝟔/𝟑𝟎 🚀 𝐓𝐨𝐝𝐚𝐲 𝐈 𝐥𝐞𝐚𝐫𝐧𝐞𝐝: Generating random values and working with strings in JavaScript 𝐁𝐮𝐢𝐥𝐭: A password generator that creates random passwords using letters, numbers, and symbols 𝐊𝐞𝐲 𝐭𝐚𝐤𝐞𝐚𝐰𝐚𝐲: Used loops and random indexing to build a dynamic string generator #30DaysChallenge #WebDev #LearningInPublic
To view or add a comment, sign in
-
Unique Permutations using Backtracking Day 9👈 At first glance, permutations are straightforward — but handling duplicates efficiently is where the real challenge lies. Key idea: -- Sort the array first -- Skip duplicate elements during iteration to avoid redundant permutations -- Use backtracking to explore all possible combinations. #JavaScript #TypeScript #DSA #Algorithms #Backtracking #CodingInterview #FrontendDeveloper #LearnToCode #ProblemSolving #100DaysOfCode
To view or add a comment, sign in
-
-
Most beginners use Promises because that's what tutorials show. But async/await exists for a reason — it's cleaner, easier to debug, and reads like normal code. Here's the side-by-side difference, with real code examples. Save this for when you hit your first API call. Learn the full stack at → www.codingelf.academy #JavaScript #WebDevelopment #CodingForBeginners #AsyncAwait #TechCareer
To view or add a comment, sign in
-
-
new blog. 📝 Destructuring in JavaScript cleaner code. less repetition. more readable. destructuring is one of those features you don't know you needed until you use it once then you can't stop. link: https://lnkd.in/gNgvuG-4 Hitesh Choudhary Piyush Garg Akash Kadlag Jay Kadlag
To view or add a comment, sign in
-
-
#Day5 One of the biggest improvements in my JavaScript journey so far has been learning how to write cleaner and more professional conditional logic. Yesterday I used traditional if-else statements to explain conditional logic. Today, I took it step further to refactor logic using nested ternary operators. => How the ternary operator (condition ? true : false) works => How to nest ternaries to handle multiple conditions => The importance of writing clean, readable code #JavaScript #M4ACELearningchallenge #LearningInPublic
To view or add a comment, sign in
-
-
📌 Promises in JavaScript A Promise represents the eventual completion or failure of an asynchronous operation It has three states: pending, fulfilled, and rejected .then() handles successful outcomes .catch() handles errors Helps avoid callback hell and improves code readability 👉 Use case: API calls, asynchronous data handling #JavaScript #Promises #AsyncProgramming #WebDev #Coding
To view or add a comment, sign in
-
Day 3 — JavaScript is humbling me in the best way. Started with the basics I thought I already knew. Turns out I knew the syntax but not the why. var vs let vs const — I used to just pick randomly. Now I get why const is default and var is basically legacy. The thing that actually clicked today: arrow functions aren't just shorter syntax. They handle 'this' differently. That's why everyone prefers them in certain situations. Also spent an hour on map, filter, and reduce with real data instead of fake tutorials. Way more useful. Favourite thing I learned: optional chaining (?.) — it's saved me from so many "cannot read property of undefined" errors already. Drop a JavaScript concept below that confused you at first 👇 #javascript #webdevelopment #frontenddeveloper #coding
To view or add a comment, sign in
-
🚀 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
-
-
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
-
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