Welcome To Tutorialspoint.dev
Officially launched 18th May 2019

# The Celebrity Problem

In a party of N people, only one person is known to everyone. Such a person may be present in the party, if yes, (s)he doesn&#x2019;t know anyone in the party. We can...

# Problem with scanf() when there is fgets()/gets()/scanf() after it

Consider below simple program in C. The program reads an integer using scanf(), then reads a string using fgets(). // C program to demonstrate the problem w...

# Box Stacking Problem DP-22

You are given a set of n types of rectangular 3-D boxes, where the i^th box has height h(i), width w(i) and depth d(i) (all real numbers). You want to create a stack ...

# Partition problem DP-18

Partition problem is to determine whether a given set can be partitioned into two subsets such that the sum of elements in both subsets is same. Examples: arr[] = {1...

# Largest Independent Set Problem DP-26

Given a Binary Tree, find size of the Largest Independent Set(LIS) in it. A subset of all tree nodes is an independent set if there is no edge between any two nodes o...

# Word Wrap Problem DP-19

Given a sequence of words, and a limit on the number of characters that can be put in one line (line width). Put line breaks in the given sequence such that the lines...

# Subset Sum Problem DP-25

Given a set of non-negative integers, and a value sum, determine if there is a subset of the given set with sum equal to given sum. Example: Input: set[] = {3, 34, ...

# Word Break Problem DP-32

Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words. See following exam...

# Activity Selection Problem Greedy Algo-1

Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. Greedy...

# The Knight’s tour problem Backtracking-1

Backtracking is an algorithmic paradigm that tries different solutions until finds a solution that &#x201C;works&#x201D;. Problems which are typically solved using ba...