🚀 What I’ve Been Learning: Algorithms & Problem Solving in JavaScript Recently, I focused on strengthening my problem-solving and algorithmic thinking using JavaScript: 🔹 Cache implementation using Map 🔹 Mutual friends counter with Set 🔹 Classic problems: Valid Parentheses, Two Sum, Palindrome Checker 🔹 Binary Search & understanding O(log n) 🔹 Sorting algorithms: Selection Sort (visualization & implementation) Insertion Sort implementation 💡 These exercises helped me think more about efficiency, data structures, and time complexity, not just writing code. Learning step by step. Practicing every day. 💪 #JavaScript #Algorithms #DataStructures #LearningInPublic #ProblemSolving #WebDevelopment
Tausif Islam Sheik’s Post
More Relevant Posts
-
Day 3 of Learning in Public: JavaScript Edition. 💻✨ Primitives Data types, and "JIT" Magic ⚡ Today I’m diving into how JavaScript actually handles data and how it runs under the hood. 💎 The Primitives (Simple & Immutable) String: Textual data like "Hello". Number: Integers or decimals like 42. Boolean: Logical true or false. Undefined: A variable declared but not yet assigned a value. Null: An intentional "empty" value. 📦 The Objects (Complex & Reference-based) Arrays: For ordered lists. Objects: For storing keyed collections. Functions: Yes, in JS, functions are objects too! Wait... Is JavaScript Interpreted or Compiled? 🤔 The answer: It’s both. Historically, JS was purely interpreted (line-by-line), which made it slow. Modern engines (like Chrome’s V8) use Just-In-Time (JIT) Compilation. How it works: An Interpreter starts running the code immediately. A Compiler watches for "hot code" (parts used frequently). It compiles that "hot code" into Machine Code on the fly for maximum speed! 🚀 #JavaScript #NodeJS #TestAutomation #JavaVsJS #SDET #Learning
To view or add a comment, sign in
-
-
Coming from JavaScript, polymorphism always felt natural — the same function behaving differently depending on the object. It’s one of the reasons modern web apps feel smooth and intuitive. Exploring it in Python has reinforced why this concept matters. Polymorphism lets us design around behavior, not rigid structures. Same interface, different outcomes — cleaner code for developers and consistent experiences for users. Think of a render() method handling buttons, modals, or cards. The UI stays predictable while the logic stays flexible. It’s one of those quiet tools that helps software evolve without breaking — and that’s exactly what clients value. Do you use polymorphism often?
To view or add a comment, sign in
-
-
🚀 Day 5 of Learning in Public: JavaScript Edition. 💻✨ — Logic, Equality, Arrays and Strings! Continuing my consistent learning streak with JavaScript. Today was all about control flow and data structures. Here is a breakdown of what I covered: 🔹 Operators: Deep dived into Comparison and Logical operators (AND, OR, NOT). 🔹 The "Equality" Triplets: = : Assignment (giving a value) == : Loose Equality (JS tries to convert type before comparing) === : Strict Equality (Checks both value and data type — definitely the safer bet!) 🔹 Strings: Explored how text is handled. While standard quotes work, I learned about Template Strings using backticks (`). String interpolation is so much cleaner than concatenating with +! 🔹 Arrays: I found it interesting how flexible JS arrays are. You can store mixed data types in a single list (Strings, Numbers, Booleans, even null and NaN) all together. Example: let name = ["Piyush", 78, true, undefined, null, NaN] Making steady progress! 💻 #JavaScript #CodingJourney #LearningInPublic #TechCommunity #NodeJS #TestAutomation #JavaVsJS #SDET
To view or add a comment, sign in
-
-
JavaScript Algorithm – First Unique Character Today I worked on a simple but powerful string problem: 👉 Find the first non-repeating character in a string How it works First pass: count the frequency of each character Second pass: return the first character with a frequency of 1 Time Complexity: O(n) Space Complexity: O(n) This pattern is very common in: String problems Interviews Real-world text processing 📌 I’m consistently practicing data structures & algorithms in JavaScript to strengthen my problem-solving skills. 🔗 Full practice repository: https://lnkd.in/ej4fNeZs #JavaScript #Algorithms #DataStructures #ProblemSolving #SoftwareEngineering #Coding #LearningInPublic #Frontend #Backend #FullStack
To view or add a comment, sign in
-
-
This is a great update to share! The introduction of the if() function is a significant milestone because it brings CSS closer to the "logic" we usually see in languages like JavaScript or Python, without losing its declarative nature. To make your post more engaging and clear for your audience, I’ve restructured it to highlight the "Why it matters" and provided a clear code comparison. 🚀 Is CSS Becoming a Programming Language? Not exactly—but it’s getting a major "brain" upgrade! Traditionally, logic in CSS (like media queries) requires jumping between different blocks of code. It works, but it can feel fragmented and repetitive. That’s about to change with the new CSS if() function. 💡 What’s changing? The if() function allows you to write inline conditional logic. Instead of writing an entire media query block to change one value, you can handle it directly inside the property declaration. #programing #css #coding #Csslanguage
To view or add a comment, sign in
-
-
Day 4 of #100DaysOfCode: Array Logic & The Magic of Truthy/Falsy in JS ⚡ Today was about mastering the fundamentals that make JavaScript unique. I split my time between solving algorithmic problems and digging deep into JS engine mechanics. 1️⃣ Data Structures & Algorithms: I tackled the "Concatenation of Array" problem (LeetCode 1929). The goal was to create an array of length 2n by concatenating two nums arrays. Key takeaway: It’s a great exercise in understanding array indexing and memory allocation. It’s simple on the surface, but efficient array manipulation is core to everything. 2️⃣ Web Development Concepts: I dove into Truthy & Falsy values. Coming from other languages, JS handling of conditionals is fascinating. I learned that 0, "", null, undefined, and NaN are the only falsy values. Everything else—including empty arrays [] and objects {}—is truthy. #JavaScript #DSA #WebDevelopment #MERNStack #CodingJourney #100DaysOfChallenge
To view or add a comment, sign in
-
Understanding Linear Search in JavaScript Linear Search is one of the simplest algorithms, yet it’s a great starting point for building strong problem-solving skills. The idea is straightforward: 👉 Traverse the array 👉 Compare each element with the target 👉 Return the index if found, otherwise -1 Even though it’s not the most efficient search algorithm, Linear Search helps beginners understand iteration, comparisons, and time complexity—fundamental concepts in algorithms. 📌 I’m sharing more JavaScript algorithm and pattern exercises here: 👉 https://lnkd.in/ej4fNeZs Consistency beats talent. One algorithm at a time. 💪 #JavaScript #Algorithms #DataStructures #CodingPractice #WebDevelopment #LearningInPublic #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Solving LeetCode #34: Find First and Last Position in Sorted Array Just solved an interesting binary search problem on LeetCode! Here's my optimized solution in JavaScript (see the image). The Challenge: Given a sorted array, find the starting and ending position of a target value with O(log n) runtime. Key Insight: Instead of just finding any occurrence, we need modified binary search to locate both boundaries efficiently. **Complete solution link in comments. Why This Works: ✅ O(log n) time complexity - beats linear search approaches ✅ Two binary searches - one for each boundary ✅ Space efficient - O(1) extra space ✅ Handles edge cases (empty arrays, single elements, no matches) Learning Point: The real power of binary search isn't just finding elements, but how we can modify it to find boundaries, ranges, and insertion points efficiently. #CodingInterview #Algorithms #DataStructures #JavaScript #LeetCode #BinarySearch #ProblemSolving #SoftwareEngineering
To view or add a comment, sign in
-
-
💻 The Day the Browser Stopped Being “Just the Browser” It started like any normal coding session. Coffee on the desk. Tabs open. One more idea I didn’t expect to actually work. Instead of spinning up Python, setting up environments, or touching a backend, I opened the browser. And then it clicked. jax-js — a machine learning library that brings JAX-style computing directly into JavaScript. NumPy-like arrays. Composable transforms like grad(), vmap(), and jit(). Written in pure JavaScript. Running on WebAssembly and WebGPU. No Python backend. No CUDA installs. No server setup. The interesting part isn’t just what it does, but how it does it. Rather than relying on slow JavaScript loops, jax-js traces array operations, compiles them into optimized kernels, and fuses long chains of math into a single execution path. The result is near-native performance on CPU or GPU, right inside the browser. What this unlocks: • Client-side ML training and inference • Gradient-based numerical computing in JavaScript • Interactive ML demos that run anywhere a browser runs Install and try it yourself: npm install @jax-js/jax import { numpy as np } from "@jax-js/jax"; const ar = np.array([1, 5, 6, 7]); console.log(ar.mul(10).js()); // [10, 50, 60, 70] The takeaway? The browser is no longer just for UI. JavaScript is no longer “too slow.” And serious computation doesn’t always need a backend. Sometimes, progress starts by opening the console and questioning old assumptions. #JavaScript #WebAssembly #WebGPU #MachineLearning #WebDev #FrontendEngineering #MLInTheBrowser
To view or add a comment, sign in
-
-
🎯 Daily Learning Update 🎯 - DSA Revision & Practice -- Revised key DSA concepts and practiced problems to strengthen logic and consistency. - JavaScript – Revision -- Revisited JavaScript fundamentals and advanced concepts, reinforcing coding skills through hands-on practice. Masai #Masaiverse #dailylearning
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