## Johnson’s algorithm for All-pairs shortest paths | Implementation

Given a weighted Directed Graph where the weights may be negative, find the shortest path between every pair of vertices in the Graph using Johnson’s… Read More »

- Sentence that contains all the given phrases
- Data Structures | Linked List | Question 1
- Johnson’s algorithm for All-pairs shortest paths | Implementation
- Advantages of vector over array in C++
- Data Structures | Linked List | Question 12
- FIFO (First-In-First-Out) approach in Programming
- Data Structures | Graph | Question 8
- Data Structures and Algorithms | Set 37
- Data Structures | Array | Question 1
- Data Structures | Linked List | Question 4
- Data Structures | Linked List | Question 3
- Data Structures | Binary Trees | Question 10
- Data Structures | Binary Trees | Question 1
- Data Structures | Binary Search Trees | Question 12
- Data Structures | Array | Question 2
- Data Structures | Tree Traversals | Question 3
- Data Structures | Linked List | Question 2
- Data Structures | Linked List | Question 5
- Data Structures | Stack | Question 6
- Check if two trees have same structure
- FIFO vs LIFO approach in Programming
- Data Structures | Queue | Question 11
- Data Structures | Linked List | Question 14
- Data Structures | Hash | Question 1
- Data Structures | Linked List | Question 6
- Data Structures and Algorithms | Set 36
- Data Structures | Linked List | Question 17
- Data Structures | Hash | Question 2
- Data Structures | Stack | Question 7
- Data Structures | Graph | Question 9

Given a weighted Directed Graph where the weights may be negative, find the shortest path between every pair of vertices in the Graph using Johnson’s… Read More »

FIFO is an abbreviation for first in, first out. It is a method for handling data structures where the first element is processed first and… Read More »

Prerequisite – FIFO (First-In-First-Out) approach in Programming FIFO is an abbreviation for first in, first out. It is a method for handling data structures where… Read More »

Given a list of sentences and a list of phrases. The task is to find which sentence(s) contain all the words in a phrase and… Read More »

Given two binary trees. The task is to write a program to check if the two trees are identical in structure. In the above figure… Read More »

Consider a hash table of size seven, with starting index zero, and a hash function (7x+3) mod 4. Assuming the hash table is initially empty,… Read More »

We have already discussed arrays and vectors. In this post, we will discuss advantages of vector over normal array. Advantages of Vector over arrays :… Read More »

Que – 1. For 8 keys and 6 slots in a hashing table with uniform hashing and chaining, what is the expected number of items… Read More »

Que – 1. The function shiftNode() which takes as input two linked lists- destination and source. It deletes front node from source and places it… Read More »

Which of the following Binary Min Heap operation has the highest time complexity? (A) Inserting an item under the assumption that the heap has capacity… Read More »

Consider the following function to traverse a linked list. void traverse(struct Node *head) { while (head->next != NULL) { printf(“%d “, head->data); head = head->next;… Read More »

Which of the following operations are used by Red-Black trees to maintain balance during insertion/deletion? a) Recoloring of nodes b) Rotation (Left and Right) (A)… Read More »

Is the following statement valid? A Red-Black Tree which is also a perfect Binary Tree can have all black nodes (A) Yes (B) No Answer:… Read More »

You are given pointers to first and last nodes of a singly linked list, which of the following operations are dependent on the length of… Read More »

Given pointer to a node X in a singly linked list. Only one pointer is given, pointer to head node is not given, can we… Read More »