Home Practice Programming

# Practice Programming

Practice Programming

### Count all possible paths between two vertices of a directed graph

Nlogn Team - 0

Given a directed graph G, and two vertices: start s & end e, count all possible way of reaching the vertex e from vertex...

Practice Programming

### Minimum number of swaps required to sort a given array

Nlogn Team - 0

Problem Statement: Given an array of n distinct elements, we have to find the minimum number of swaps required to sort the given array.
Example...

Practice Programming

### Detect Cycle in a Directed Graph

Nlogn Team - 0

We are given a directed graph with V vertices and we have to find whether this directed graph contains a cycle or not. A cycle...

Practice Programming

### Maximize the number of cut segments of length x, y and z

Nlogn Team - 0

We are given a rod of length L, our task is to cut the rod into segments of x, y & z such that...

Practice Programming

### Wildcard Pattern Matching using Dynamic Programming

Nlogn Team - 0

Wildcard Pattern Matching - Given a text of length n and a wildcard pattern of length m, we are supposed to find whether the...

Practice Programming

### Largest Rectangular Area in a given Histogram

Nlogn Team - 0

Given a histogram find the largest rectangle (rectangular area) that can be made out of the number of contiguous bars, assuming that every bar...

Practice Programming

### Find whether a given array is a subset of another array

Nlogn Team - 0

We are given two arrays, arr1 and arr2, that contains n, m number of distinct elements in unsorted order. We are supposed to find,...

Practice Programming

### Find all triplets such that sum of two equals to third element

Nlogn Team - 0

We are given an array of n distinct integers and we have to find all triplets (3 elements), such that the sum of two...

Practice Programming

### DP – Coin Change: Find number of ways of representing n cents

Nlogn Team - 0

Given an infinite supply of 25 cents, 10 cents, 5 cents, and 1 cent. Find the number of ways of representing n cents. (The...

Practice Programming

### Rotate a matrix by 90 degrees in the clockwise direction

Nlogn Team - 0

We are given an NxN matrix and we have to rotate it by 90 degrees in a clockwise direction without using any extra space.
Input:
10 11 12...

### Subscribe to our newsletter

To be updated with all the latest news, offers and special announcements.

Even we hate spam as much