Category: Data Structure
-
Data StructureFind 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
-
Data StructureMinimum 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
-
Data StructureEfficient 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
-
AmazonStaircase 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
-
AlgorithmProduct of Array Except Self
Problem Statement (Asked By Uber) Given a list of integers, return a new list such that each element at index…
December 30, 2024
-
AlgorithmDSA: Heap
A heap is a specialized tree-based data structure that satisfies the heap property. It is commonly used to implement priority…
June 10, 2023
-
Data StructureDSA: Trie
What is a Trie in DSA? A trie, often known as a prefix tree, is a tree-like data structure used…
May 31, 2023
-
Data StructureTrees: Lowest Common Ancestor
What is the Lowest Common Ancestor? In a tree, the lowest common ancestor (LCA) of two nodes, n1 and n2,…
May 30, 2023
-
Data StructureBinary Search Tree (BST)
A Binary Search Tree (BST) is a type of binary tree that satisfies the following properties: For any node in…
May 29, 2023
-
Data StructureTypes of Views & Binary Trees
In binary trees, the views and types refer to different perspectives and classifications of the tree structure. Types of Views…
May 29, 2023