Quantcast
Channel: ProDeveloperTutorial.com
Browsing latest articles
Browse All 70 View Live

Image may be NSFW.
Clik here to view.

Check if binary tree is a sum tree

In this tutorial we shall check if the tree is a sum tree or not. Problem Statement: You are given the root node of a binary tree. You need to check if that tree is a sum tree or not. Example: Consider...

View Article


Image may be NSFW.
Clik here to view.

Add all the node values in a Binary Tree or Sum of a Binary tree

In this chapter, we shall see how to add all the nodes value. Problem Statement: Given a binary tree root node, return the sum of all the nodes of the tree. Example: Consider the tree below: The total...

View Article


Image may be NSFW.
Clik here to view.

Print the number of leaf nodes in a binary tree

In this chapter we shall print the number of leaf nodes in a binary tree. Problem Statement: You are given the root node of the tree. You need to return the total number of leaf nodes present in that...

View Article

Image may be NSFW.
Clik here to view.

Print all the paths from root node to leaf node

In this chapter we shall see how to print all the paths from root to leaf nodes. Problem Statement: You are given the root node of a binary tree, you need to print all the paths from root node to leaf...

View Article

Image may be NSFW.
Clik here to view.

Print the nodes at k distance from the root of a binary tree

In this tutorial we shall see how to print all the nodes that is k distance from root. Problem statement: Given the root node and the distance k, print all the nodes that are at distance k from root...

View Article


Image may be NSFW.
Clik here to view.

Dynamic Programming: Longest Increasing Subsequence

In this tutorial we shall look at longest increasing subsequence and we shall solve it by using Dynamic Programming. Problem Statement: You are given an array of integers; you need to find the longest...

View Article

Image may be NSFW.
Clik here to view.

Longest Bitonic Subsequence

In this tutorial we shall solve longest Bitonic subsequence using DP. Before solving the question, let’s understand what does Bitonic means. Bitonic is a sequence where the number increases at certain...

View Article

Image may be NSFW.
Clik here to view.

Get Max Coin In Game problem.

In this chapter we shall solve how to get maximum coin in a game problem with help of DP. Problem Statement: You and your friend are playing a game to pick numbers from an array of even length. You...

View Article


Image may be NSFW.
Clik here to view.

Rod Cutting Problem

In this tutorial we shall learn about rod cutting problem. Problem statement: You are given a rod of length n and you need to cut the cod in such a way that you need to sell It for maximum profit. You...

View Article


Box Stacking Problem

View Article
Browsing latest articles
Browse All 70 View Live