Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8621409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:48:52+00:00 2026-06-12T06:48:52+00:00

I recently interviewed with Microsoft and they asked me the following puzzle, for which

  • 0

I recently interviewed with Microsoft and they asked me the following puzzle, for which I had to write an algorithm and accompanying test cases. I wasn’t able to crack it and it still is a puzzle to me.

Problem Statement :

A champagne pyramid is a pyramid made of champagne glasses , each of equal capacity say , n.
The pyramid begins with one glass at the top level , two glasses at the second level , then three below that and so on up to infinite levels. A level x of the pyramid thus has x no. of champagne glasses.

A steady stream of champagne is poured down from the top level,which trickles down to the lower levels. What is the distribution of champagne in the glasses at a given level i.

The problem is quite abstract and those are all the inputs I was given.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:48:53+00:00Added an answer on June 12, 2026 at 6:48 am

    The answer is Normal Distribution I believe.

    Have a look at the diagram:

               |1|
               ---
            |2|   |3|
            ---   ---
         |4|   |5|   |6|
         ---   ---   ---
       |7|  |8|   |9|   |10|
       ---  ---   ---   ----
    

    Let’s say you have a flow of X

    1 will flow into 2,3 uniformly, thus each gets 1/2X

    each will flow uniformly to the glasses below it, so 4 gets 1/4X, 6 gets 1/4X and 5 gets 2*1/4X= 1/2X

    At next level – the same principle applies:

    7 gets 1/8X
    8 gets 1/8X from 4 and 1/4X from 5, totaling 3/8X,
    9 gets same as 8 and 10 same as 8.
    

    At infinity – it should converge into normal distribution.

    At any finite number i – it should be f(i,n)/ 2^(i-1) where f(i,n) is the nth binomial number for level i polynomial. As @veredmarald indicated in comments, that distribution function is actually Binomial Distribution for p = 1/2, thus giving you flow(i)~Bin(i-1,1/2)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently interviewed with a company and they asked me to write an algorithm
I was interviewed recently and asked to write mystrcat(*s1, *s2, *s3) where s1 and
I recently gave an interview at a company where they asked me the following
Recently in an interview I was asked to write a query where I had
Recently in an interview i was asked a question to write a function which
This was asked in my Google interview recently and I offered an answer which
Recently I was asked the following question at interview. What are the different way
Recently I was asked the following questions in an interview: How will you do
I have been asked recently in a job interview to develop an algorithm that
I had an interview recently and he asked me about Singleton Design Patterns about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.