DSA

Generate Parenthesis | Intuition + Code | Recursion Tree | Backtracking | Java

Problem Statement: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. Example 1: Input: n = 3…

2 months ago

Square Root of Integer

Given an integer A. Compute and return the square root of A. If A is not a perfect square, return…

1 year ago

Build Array From Permutation

Given a zero-based permutation nums (0-indexed), build an array ans of the same length where ans[i] = nums[nums[i]] for each…

1 year ago

DSA: Heap

A heap is a specialized tree-based data structure that satisfies the heap property. It is commonly used to implement priority…

1 year ago

DSA: Trie

What is a Trie in DSA? A trie, often known as a prefix tree, is a tree-like data structure used…

1 year ago

Trees: Lowest Common Ancestor

What is the Lowest Common Ancestor? In a tree, the lowest common ancestor (LCA) of two nodes, n1 and n2,…

1 year ago

Binary Search Tree (BST)

A Binary Search Tree (BST) is a type of binary tree that satisfies the following properties: For any node in…

1 year ago

Types of Views & Binary Trees

In binary trees, the views and types refer to different perspectives and classifications of the tree structure. Types of Views…

1 year ago

Binary Trees: Structure & Tree travels

Binary Tree Structure: A binary tree is a tree data structure where each node has at most two children: a…

1 year ago

Queues in DSA

What is a Queue in DSA? A queue is a linear data structure that holds elements in a certain order. It accesses items using the FIFO (First In First Out) method.It can only be changed by adding data entities at one end or…

1 year ago