## Count index pairs which satisfy the given condition

Given a permutation P of first N natural numbers, the task is to count the index pairs (i, j) such that P[i] + P[j] =… Read More »

- Sum of all Palindrome Numbers present in a Linked list
- Program to print all the non-reachable nodes | Using BFS
- Least Common Ancestor of any number of nodes in Binary Tree
- Binary Search Tree | Set 3 (Iterative Delete)
- Encryption and Decryption of String according to given technique
- Program to delete all even nodes from a Singly Linked List
- C program to implement Adjacency Matrix of a given Graph
- Count of triplets in an Array (i, j, k) such that i < j < k and a[k] < a[i] < a[j]
- Minimum cost to merge numbers from 1 to N
- Program to create Custom Vector Class in C++
- Count of root to leaf paths in a Binary Tree that form an AP
- Sideways traversal of a Complete Binary Tree
- Maximum of XOR of first and second maximum of all subarrays
- Find all Factors of Large Perfect Square Natural Number in O(sqrt(sqrt(N))
- Sum of all perfect numbers present in an Linked list
- Shortest path in a complement graph
- Count of strings possible by replacing two consecutive same character with new character
- Print the nodes having exactly one child in a Binary tree
- Check if alternate path exists from U to V with smaller individual weight in a given Graph
- Print sublist of a given Linked List specified by given indices
- Comparison between Lists and Array in Python
- Count of elements on the left which are divisible by current element | Set 2

Given a permutation P of first N natural numbers, the task is to count the index pairs (i, j) such that P[i] + P[j] =… Read More »

Data Type A data type is the most basic and the most common classification of data. It is this through which the compiler gets to… Read More »

Given a person who is at position current_pos and a binary string path which is the moves the person took, if path[i] = ‘0’ then… Read More »

Stack A stack is a linear data structure in which elements can be inserted and deleted only from one side of the list, called the… Read More »

Introduction to Singly linked list : A singly linked list is a set of nodes where each node has two fields ‘data’ and ‘link’. The… Read More »

Given a binary tree and an integer b representing budget. The task is to find the count of maximum number of leaf nodes that can… Read More »

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 »