All tags

#DeveloperJourney

7 uses
Posts
Post Mrinal

LeetCode Problem: Median of Two Sorted Arrays | JavaScript

Today, I successfully solved the Median of Two Sorted Arrays problem on LeetCode using JavaScript and an optimized binary search approach. The challenge is to find the median of two sorted arrays without simply merging them. The goal is to achieve an efficient time complexity of O(log(min(m, n))), making the solution suitable even for large input arrays. 💡 My Approach: Apply binary search to the …

3
Post Mrinal

Merge Two Sorted Lists — Solved in JavaScript

Today I solved LeetCode 21: Merge Two Sorted Lists, a classic linked-list problem that is great for strengthening pointer manipulation and understanding how linked lists work. The goal is simple: given two sorted linked lists, merge them into a single sorted linked list. For example: Input: List 1: [1,2,4] List 2: [1,3,4] Output: [1,1,2,3,4,4] I solved this using a dummy node and a current pointe…

7
Post Mrinal

Successfully solved the Integer to Roman problem in JavaScript and got an Accepted result with all 3999/3999 test cases passed! 🎉

The approach uses a greedy algorithm with Roman numeral values arranged from largest to smallest, including special combinations such as: 1000 → M 900 → CM 500 → D 400 → CD 100 → C 90 → XC 50 → L 40 → XL 10 → X 9 → IX 5 → V 4 → IV 1 → I The algorithm repeatedly checks whether the current number is greater than or equal to a Roman numeral value. If it is, that symbol is added to the result and the…

8
1
Post Mrinal

Another LeetCode Problem Solved! | Roman to Integer

Consistency is the key to becoming a better programmer, and today I’m excited to share another successful milestone in my coding journey! 🎯 I successfully solved the Roman to Integer problem on LeetCode using JavaScript, achieving an Accepted status with all 3999 test cases passed. 🔍 What I Learned: The problem focuses on converting Roman numerals into their corresponding integer values. Roman nu…

5
Post Mrinal

LeetCode Progress: Palindrome Number | JavaScript

Another problem solved and another step forward in my coding journey! 💻 Today, I successfully solved LeetCode Problem 9: Palindrome Number using JavaScript. The challenge was to determine whether a given integer reads the same forward and backward. For example: ✅ Input: 121 → Output: true ❌ Input: -121 → Output: false ❌ Input: 10 → Output: false 💡 My Approach I used a mathematical approach to rev…

4
Post Mrinal

Today’s coding practice focused on a classic LeetCode problem: Longest Substring Without Repeating Characters.

The goal is simple but requires a smart approach: given a string, find the length of the longest substring that contains no repeated characters. For example: "abcabcbb" → 3 ("abc") "bbbbb" → 1 ("b") "pwwkew" → 3 ("wke") Instead of checking every possible substring, I solved it using the Sliding Window + Hash Map technique. 💡 How the approach works I maintain two important variables: 🔹 start — rep…

6
Post Mrinal

Today, I successfully solved the “Add Two Numbers” problem on LeetCode using JavaScript.

The problem involves adding two numbers represented by linked lists, where each node contains a single digit. The digits are stored in reverse order, and the result must also be returned as a linked list. For example: Input: l1 = [2,4,3] l2 = [5,6,4] Output: [7,0,8] This problem may look simple at first, but it requires careful handling of several important concepts: 🔹 Linked List Traversal I lea…

7