Home Practice Programming

# Practice Programming

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...

Practice Programming

### Inorder Successor of a Node in Binary Search Tree

Nlogn Team - 0

Given a pointer to a node of a Binary Search Tree(BST), we have to find the next node, which is the Inorder...

Practice Programming

### Design an algorithm to create a linked list of all the nodes at each depth

Nlogn Team - 0

Given a binary tree, we have to design an algorithm that will create a linked list of all the nodes at each...

Practice Programming

### Insert M into N such that M starts at bit j and ends at bit i

Nlogn Team - 0

Given two 32-bit numbers, Nand M, and two-bit positions, i and j. Write a method to insert Minto N such that M...

Practice Programming

### Print all possible combinations of balanced valid parenthesis

Nlogn Team - 0

We have to write an algorithm to print all possible combinations of the balanced valid parenthesis for n pairs of parenthesis. A...

Practice Programming

### Print all unique permutations of a string with duplicate characters

Nlogn Team - 0

A permutation is an act of rearranging or reordering elements of a set or string uniquely etc.For n elements, n! (n factorial) permutations are...

Practice Programming

### Print all permutations of a string with unique characters

Nlogn Team - 0

A permutation is an act of rearranging or reordering elements of a set or string etc.
For n elements, n! (n factorial) permutations are possible.
Ex->...

Practice Programming

### Find all possible subset of a given set

Nlogn Team - 0

Given a set (of n elements), Print all possible subset (2^n) of this set.
Example: Set = {a,b,c}, Power set of S, P(S) = {Φ,...

Practice Programming

### Find if a path is possible for reaching bottom right from the top left in a nxm grid

Nlogn Team - 0

A robot sitting on the upper left corner(0,0) of a grid with r rows and c columns.
The robot can only move in two directions:...

### Subscribe to our newsletter

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

Even we hate spam as much