Open Soham-Official opened 3 years ago
Please assign me to this issue under LGMSoC'21. @ravikr126 @Amit366
Kindly assign me this issue under LGMSOC'21
Please assign me this issue as I am a participant of LGMSOC'21.
I used Python3
Mention the language u wanna do in
I will solve in c++ language.
@Amit366 i can do in all the four languages.. what to do? also please assign the label to it.
AIM
I will be adding a question in the GFG folder Egg Dropping Puzzle
Problem Statement
Suppose you have N eggs and you want to determine from which floor in a K-floor building you can drop an egg such that it doesn't break. You have to determine the minimum number of attempts you need in order find the critical floor in the worst case while using the best strategy. There are few rules given below.
An egg that survives a fall can be used again. A broken egg must be discarded. The effect of a fall is the same for all eggs. If the egg doesn't break at a certain floor, it will not break at any floor below. If the eggs breaks at a certain floor, it will break at any floor above.
problem link https://practice.geeksforgeeks.org/problems/egg-dropping-puzzle-1587115620/0/?track=dsa-workshop-1-dp&batchId=308
Testcases
Example 1: Input: N = 2, K = 10 Output: 4
Example 2: Input: N = 3, K = 5 Output: 3
Programming language