Author: Hassan Raza
-
DSA SheetAutocomplete System Implementation
Build an autocomplete system that, given a query string s and a set of possible query strings returns all strings…
January 10, 2025
-
DSA SheetStaircase Climbing Ways
There is a staircase with N steps, and you can ascend either 1 step or 2 steps at a time….
January 11, 2025
-
DSA SheetLongest Substring with K Distinct Characters
Given an integer k and a string s, write a function to determine the length of the longest substring in…
January 16, 2025
-
DSA SheetEstimate π Using Monte Carlo Method
The formula for the area of a circle is given by πr². Use the Monte Carlo method to approximate the…
January 17, 2025
-
DSA SheetSelect a Random Element from a Stream
You are given a stream of elements that is too large to fit into memory. Write an algorithm to select…
February 3, 2025
-
DSA SheetEfficient Order Log Storage
You manage an e-commerce website and need to keep track of the last N order IDs in a log. Design…
February 6, 2025
-
DSA SheetLongest Absolute Path in File System Representation
Find the length of the longest absolute path to a file within the abstracted file system. The length is measured…
February 19, 2025
-
DSA SheetMinimum Cost to Paint Houses with K Colors
A builder plans to construct N houses in a row, where each house can be painted in K different colors….
March 9, 2025
-
DSA BasicsFind Intersection of Two Singly Linked Lists
You are given two singly linked lists that intersect at some node. Your task is to find and return the…
March 11, 2025
-
OODPWhat is object oriented design patterns
A design pattern is a reusable solution to a commonly occurring problem in software design. They are not finished, ready-to-use pieces…
September 5, 2025
-
OODPFactory Method Design Pattern in OODP
Factory Method is a creational design pattern that deals with the object creation. It separates the object creation logic from…
September 26, 2025
-
Dynamic ProgrammingWhat is Dynamic Programming?
Dynamic Programming (DP) is a problem-solving technique that breaks complex problems into simpler overlapping subproblems, solves each subproblem only once,…
April 18, 2026