I have a real time problem which is like:
Salman has a garden with N flower pots arranged in a row. Every morning he walks through the row and plucks flower. He targets to visit the first K pots in the row.
Find the number of different flowers that Salman would pluck on a single walk through K pots.
What is the approach of solution for this problem
Also, let me know where i can find more such problems.
Missed this puzzle completely. Hope OP is still around...
Can you elaborate in what way the flowers are different, and why he wouldn't pluck the first K flowers one day, the next K flowers the following day, until all flowers are plucked?
If you want to see similar puzzles, Google for "probability puzzles", you will find a lot of sites. A classical one is of course the three doors problem. Always funny, and it once led to a gigantic discussion in the newspapers here in Holland.
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database