Hello, I am Mohammad, having 15+ years of experience in Software Engineering. Last 10 years I have been doing consultancy and worked on companies like JPMorgan Chase, Goldman Sachs, American Express, Prudential Financial etc. as consultant. Now I am sharing my expertise through this channel @code_design , my website: www.spring-soft.com
Channel: Code Design handle: @code_design


Code Design

I just released a new YouTube Video that tackles this challenge using a Disjoint Set (Union-Find) approach! In the video, I break the solution into 4 easy-to-follow steps, walking through examples and code for each part to make the process crystal clear.

This guide is perfect for anyone preparing for tech interviews or looking to master complex algorithms. Check it out and let me know what you think!

1 year ago | [YT] | 0

Code Design

Finding components/groups in a Matrix.

1 year ago | [YT] | 0

Code Design

Just Published this Video.

1 year ago | [YT] | 0

Code Design

Leetcode Problems by Pattern. Pattern - Prefix Sum

1 year ago | [YT] | 0

Code Design

Leetcode Problems by Pattern. Pattern - Prefix Sum

1 year ago | [YT] | 0

Code Design

An efficient implementation of Binary Tree Level Order Traversal, understanding by drawing and coding side by side, Code walk through with example

1 year ago | [YT] | 0

Code Design

Valid Parentheses, Leetcode 20, A good example of solving problem using Stack.

https://youtu.be/GrKrWeY2rjo

1 year ago | [YT] | 0

Code Design

Searching in a sorted rotated array


Binary search is a fundamental algorithm in computer science due to its efficiency in finding elements within a sorted array.

By repeatedly dividing the search interval in half, binary search reduces the time complexity to O(log n), making it significantly faster than linear search for large datasets.

One intriguing problem that showcases the power of binary search is searching in a sorted rotated array.

Imagine an array sorted in ascending order but then rotated at an unknown pivot. This disrupts the normal ordering, making a direct binary search ineffective.

However, with clever modifications, binary search can be adapted to handle this situation, efficiently finding the target element by determining which portion of the array is properly sorted and then proceeding accordingly.

This problem highlights the adaptability and robustness of binary search, emphasizing its importance in algorithm design and problem-solving.




https://youtu.be/69QY-wzc1GU

1 year ago | [YT] | 0

Code Design

Just published my video on Problem Solving

Group Anagrams- Leetcode 49 - Java

This problem is one of the Blind 75 problems.



Given an array of strings strs, group the anagrams together.

You can return the answer in any order.

Example 1:

Input: strs = ["eat","tea","tan","ate","nat","bat"]

Output: [["bat"],["nat","tan"],["ate","eat","tea"]]


https://youtu.be/ORlVAMF45x8?si=MzudG...


#coding #java #ProblemSovling #leetcode #hashmap #string #anagram #interviewtips

1 year ago | [YT] | 0

Code Design

Design and implement a Thread Safe Connection Pool

Implemented a Connection Pool using an interface called ConnectionPool.

The ConnectionPool Interface has methods like: getConnection(long timeout) and releaseConnection(Connection connection)

In this Video, I have two implementations of Connection Pool.
First implemented the ConnectionPool using LinkedList as Queue
and then implemented using an ArrayBlockingQueue

Wrote a ConnectionPoolTest class to test both implementations using 100 maxPoolSize and firing 1000 Mysql Queries using Java Virtual Thread Per Task Executor.


https://youtu.be/fdV4o7PmB-0

1 year ago | [YT] | 0