# Tag Archives: Complexity-analysis

The Time Complexity of merge sort for Best case, average case and worst case is O(N * logN). Merge Sort is a sorting algorithm that… Read More
Let us discuss the Time and Space complexity of different Tree Traversal techniques, such as Inorder Traversal, Preorder Traversal, Postorder Traversal, etc. Time Complexity of… Read More
The average time complexity of quick sort is O(N log(N)). Quick Sort is a sorting algorithm that works using the Divide and Conquer approach. It… Read More
The Bubble Sort algorithm has a time complexity of O(N2) and a space complexity of O(1) since it does not require any additional memory space… Read More
The Selection sort algorithm has a time complexity of O(n^2) and a space complexity of O(1) since it does not require any additional memory space… Read More
What is Time Complexity? Time Complexity is the amount of time taken by the algorithm to run. It measures the time taken to execute each… Read More
How does deleting a node in Singly Linked List work? To delete a node from a linked list we need to break the link between… Read More
To understand this let’s take a binary tree Binary tree If we conduct BFS in this tree: In level 0 there is one node in… Read More
BFS and DFS are two algorithms that we use for graph traversal. In both the algorithms we start from a node and iterate over the… Read More
What is Amortization? Consider that you are a company owner and that you require a vehicle. The automobile is priced at €10, 000. You’ll have… Read More
Prerequisites: NP-Completeness, NP Class, Max2SAT, 3SAT Problem: Given a 2-CNF (Conjunctive Normal Form) Boolean expression (with m clauses, n variables) and an integer k, Decide… Read More
What is Stack? Stack is a linear data structure that follows a particular order in which the elements are inserted and deleted. A stack follows… Read More
Prerequisite: NP-Completeness, NP Class, SAT  Problem– The Almost-SAT problem which is built on top of SAT(Boolean Satisfiability Problem) problem takes a boolean formula in conjunctive… Read More
What is Queue? Queue is a linear data structure that follows FIFO approach (First In First Out). One can imagine a queue as a line… Read More
Prerequisite: NP-Completeness, NP Class, Clique Problem: Given an undirected graph G = (V, E) and an integer K, determine if there is a kite subgraph… Read More