Skip to content

Commit 355dd9e

Browse files
committed
Added readme for dp problems and updated main readme
1 parent cd1c1e9 commit 355dd9e

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

DP/Egg Dropping Puzzle/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Suppose there is a building with n floors, if we have m eggs, then how can we find the minimum number of drops needed to find a floor from which it is safe to drop an egg without breaking it.
2+
3+
There some important points to remember:
4+
5+
When an egg does not break from a given floor, then it will not break for any lower floor also.
6+
If an egg breaks from a given floor, then it will break for all upper floors.
7+
When an egg breaks, it must be discarded, otherwise, we can use it again.

DP/Tiling Problem/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Problem:
2+
You are given a grid of size n×2 and n tiles of size 2×1. In how many different ways can you tile the grid such that the entire grid is covered and no tiles overlap. (The tiles look identical to each other. Two ways of tiling are different based on whether the tiles are placed horizontally or vertically).
3+
4+
Example: There are 3 possible ways of tiling a 3×2 grid.
5+
6+
Tiling 1:
7+
8+
Three vertical tiles
9+
10+
__ __ __
11+
12+
| | | |
13+
14+
|__|__|__|
15+
16+
17+
18+
Tiling 2:
19+
20+
1 vertical tile, followed by 2 horizontal tiles
21+
22+
__ _____
23+
24+
| |_____|
25+
26+
|__|_____|
27+
28+
29+
30+
Tiling 3:
31+
32+
2 horizontal tiles, followed by 1 vertical tile
33+
34+
_____ __
35+
36+
|_____| |
37+
38+
|_____|__|

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ ACM-ICPC Algorithms is a collection of important algorithms and data structures
6060
* [Coin Change](/DP/Coin%20Change%20Problem)
6161
* [Collect Maximum Points](/DP/Collect_Max_Points)
6262
* [Edit Distance](/DP/EditDistance)
63+
* [Egg Droping Puzzle](/DP/Egg%20Droping%20Puzzle)
6364
* [Fibonacci Series](/DP/Fibonacci)
6465
* [Floyd Warshall Algorithm](/DP/Floyd%20Warshall%20Algorithm)
6566
* [Game Of Sum](/DP/game_of_sum)
@@ -78,6 +79,7 @@ ACM-ICPC Algorithms is a collection of important algorithms and data structures
7879
* [Shortest Uncommon Subsequence](/DP/ShortestUncommonSubsequence)
7980
* [Subset Sum](/DP/subset%20sum%20problem)
8081
* [Longest Bitonic SubSequence](/DP/LongestBitonicSubseq)
82+
* [Tiling Problem](/DP/Tiling%20Problem)
8183
* [Graph Algorithms](/Graph)
8284
* [Articulation Points](/Graph/Articulation_points)
8385
* [Bellman Ford SSSP](/Graph/BellmanFordSSSP)
@@ -165,6 +167,7 @@ ACM-ICPC Algorithms is a collection of important algorithms and data structures
165167
* [Linear Search](/Search/LinearSearch)
166168
* [Ternary Search](/Search/TernarySearch)
167169
* [Interpolation Search](/Search/InterpolationSearch)
170+
* [Exponential Search](/DP/ExponentialSearch)
168171
* [Sorting Algorithms](/Sorting)
169172
* [BogoSort](/Sorting/BogoSort)
170173
* [Bubble Sort](/Sorting/Bubble%20Sort)

0 commit comments

Comments
 (0)