Given an integer N, the task is to print all possible Full Binary Trees with N nodes. The value at the nodes does not contribute… Read More

# Category Archives: Dynamic Programming

Given three integers N, L, and R, the task is to print the total count of ways to form a necklace of at most N… Read More

Given a positive integer N, the task is to count the number of N-digit numbers where each digit in the number is the mean of… Read More

Given a positive integer N, the task is to count the number of N-digit numbers such that the bitwise AND of adjacent digits equals 0.… Read More

There are many ways of classifying algorithms and a few of them are shown below: Implementation Method Design Method Other Classifications Classification by Implementation Method:… Read More

Given a complete graph having N nodes and N*(N-1)/2 edges and a positive integer K, the task is to find the number of ways if… Read More

Given a string S, the task is to find the length of the shortest compressed string. The string can be compressed in the following way:… Read More

Given two arrays A[] and B[] each of size N, the task is to find the maximum sum that can be obtained based on the… Read More

Given a positive integer N, the task is to count the number of N-digit numbers such that every digit from [0-9] occurs at least once.… Read More

Given three non-negative integers, X, Y, and K, the task is to find the Kth smallest lexicographical string having X occurrences of character ‘a’ and… Read More

Given two positive integers N and L, the task is to find the number of L-length arrays made up of first N natural numbers such… Read More

Rahul and Ankit are the only two waiters in the Royal Restaurant. Today, the restaurant received N orders. The amount of tips may differ when… Read More