Ayush7614 / Daily-Coding-DS-ALGO-Practice

A open source project🚀 for bringing all interview💥💥 and competative📘 programming💥💥 question under one repo📐📐
https://daily-ds-algo.github.io/DS-Algo-Website/
MIT License
321 stars 474 forks source link

Egg Dropping Puzzle(GFG) #1621

Open Soham-Official opened 3 years ago

Soham-Official commented 3 years ago

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

Soham-Official commented 3 years ago

Please assign me to this issue under LGMSoC'21. @ravikr126 @Amit366

sonamgupta136 commented 3 years ago

Kindly assign me this issue under LGMSOC'21

suy1968 commented 3 years ago

Please assign me this issue as I am a participant of LGMSOC'21.

I used Python3

Amit366 commented 3 years ago

Mention the language u wanna do in

sonamgupta136 commented 3 years ago

I will solve in c++ language.

Soham-Official commented 3 years ago

@Amit366 i can do in all the four languages.. what to do? also please assign the label to it.