AceTheInterview
Jobs in Pune | Work better in teams | Socialize with friends | Submit Q&A | Tell a friend
Search site for 

Top 100 Interview Questions & Answers in a convenient and easy to read book!

“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”

– Ravi, California

Read more comments...

Interview Questions And Answers RSS Feed

Answers »

  1. Submitted By: helpmefindjob — October 11, 2006
    +43 votes
      + -

    You need to make sure that your cut passes through the center of both rectangles. Find the center of each rectangle, and then cut a line that runs between them. If both rectangles have the same center, then you can cut at any angle that goes through the center.

  2. Submitted By: Mari — October 11, 2006
    +18 votes
      + -

    You could cut the cake horizontally!

  3. Submitted By: Kitrek — October 26, 2006
    +9 votes
      + -

    You can’t cut the cake horizontally if the rectangle removed does not go all the way to the bottom of the cake. (for instance if they only remove the first layer of a layered cake)

  4. Submitted By: Debadyuti Banerjee — October 30, 2006
    -7 votes
      + -

    You need to make sure that your cut passes through the center of both rectangles. Find the center of each rectangle, and then cut a line that runs between them. If both rectangles have the same center, then you can cut at any angle that goes through the center.

  5. Submitted By: Bob — November 15, 2006
    -2 votes
      + -

    If you cut a cake by connecting the centers there are cases left where that will cut it into 3 unequal slices. yes 2 of them equal the other. But thats not what the question asks, so I say this question might not have an answer.

  6. Submitted By: Jordan — November 27, 2006
    -1 votes
      + -

    How can a single slice ever produce three pieces?

  7. Submitted By: Bill Gates — November 28, 2006
    +8 votes
      + -

    The question is ill-formed because “equals” has not been defined. As any good programmer knows, equality could mean identity or equivalence under any number of relations. In this case, does “equal pieces” mean the same volume? Same shape? Same mass (you assumed the density of the cake is uniform, didn’t you)?

    As Bob notes, it is possible to take a long, thin rectangle from near the top of the cake that is almost as wide as the cake, but forces the cake to have a ‘C’ shape with a thick bottom. Now if you cut through the middle of both rectangles, you will essentially be cutting across the ‘C’ vertically, which will result in 3 pieces. Topologically speaking, this is very different from 2 pieces, which is why “equal pieces” needs to be more specifically defined.

    The fact that the one prescient answer received a negative vote while the naive answers received positive ones proves that anyone using this site is unlikely to be taken seriously as a programmer (though I certainly hope Microsoft feels otherwise).

  8. Submitted By: Vladimir — November 28, 2006
    +1 votes
      + -

    The most important part of every solution to this problem is to find the cake’s center of mass since any straight cut passed (only) through that point divide the cake into two equal pieces.

    In the most difficult case when a cake and holes have pretty wrong shapes the best (and easiest) solution would be to accurately shift the cake towards an edge of a table to the very point when it is almost out of balance. So the table’s edge is the line of cut (precise enough).

  9. Submitted By: monoquemado — November 30, 2006
    +20 votes
      + -

    slice the cake half-way through the depth of the cake (look through the side of the cake). This way no matter what size the slice removed is or where it is removed, you will still have two equal pieces.

  10. Submitted By: mmm — March 22, 2007
    +5 votes
      + -

    First thing would be to define the equal.
    So, if we’re talking about a cake:
    1. Usually the cake is made of layers, so cutting in between layers is no good (also think at cutted rectangular may not be the whole depth)
    2. Cakes are made to be eaten

    Following would be my definition of equality:the same amount of volume from any goodies inside.
    this implies that the cut should be “vertical”.

    Remember that this is an elementary problem from geometry, where they ask about area, and do not refer specificcaly at number of pieces. So, we may define a piece as the amount of cake that should go to different plates.

    Now the natural answer (#1):
    You need to make sure that your cut passes through the center of both rectangles. Find the center of each rectangle, and then cut a line that runs between them. If both rectangles have the same center, then you can cut at any angle that goes through the center.

  11. Submitted By: Ben Dover — April 11, 2007
    +2 votes
      + -

    “Bill Gates” has the only valid answer. Since equal is not specifically defined, there can be many types of the right answer. Companies like Google and Microsoft actually look to see if you can recognize that the answer can vary because of its ambiguity. However, they also want you to be able to solve the problem once the ambiguity is defined.

  12. Submitted By: Senthil — June 3, 2007
    +7 votes
      + -

    To be simple

    any plane that passes through the center of a cuboid will definitely make the cuboid split into two halves which will be equal in size and similar in shapes.

    Provided a cuboid is cutout from the cake. If you can find the center of original cuboid and cutout piece and make a plane of theses two points and make a cut the remaining cake will be definitely of equal size and similar shape.

    Because
    assuming the cut has made before the piece has been removed that would have given us equal and similar pieces. Out of the rectangular cuboid removed, if we make cut through its center, even the removed piece would have got into two pieces. Here actually we are sharing the loss of that piece by including that centre also.

    Moreover the problem can be extended what if two rectangular pieces of cakes been removed the original cake and allowed to make a single cut to make the cake to equal halves. There we have to form a plane having the center of three, the original amd that of two cutout pieces.

  13. Submitted By: gorkem — September 10, 2007
    -2 votes
      + -

    “a rectangular cake”, as rectangle shape is known, so shall the equal definition is know as in geometrical manner. Question says rectangular (we have no idea about depth, so assumption should be it is 2D, and whoever eats those cakes are cartoon characters living in a 2D world, (no time dimension there!!) ) . So helpmefindjob (1), states the correct answer in these conditions.

  14. Submitted By: sarah — September 20, 2007
    -1 votes
      + -

    Cut the cake on the half way to the HIGHT axis.

  15. Submitted By: ducu26 — September 28, 2007
    -1 votes
      + -

    Cut the cake to 3 (or 2) rectangulars and half the pieces through diagonal.

  16. Submitted By: sameer — November 12, 2007
    -1 votes
      + -

    cut along a line which passes through the centers of both reactangles

  17. Submitted By: Byrne — November 26, 2007
    +2 votes
      + -

    You need two points that are level and can support the cake (fingers may have to do).* Adjust the points and the cake until it balances (you can push your fingers closer together to do this; the minimal amount of friction is present when they’re moving towards its center of gravity. Then cut along a) the line formed by connection the points, or b) cut out the plane formed by those two points and any point on the line formed by either point and earth’s center of gravity.

    * This assumes the cake is on a pan or other sturdy surface.

  18. Leave an Answer/Comment

    To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
    Click to hear an audio file of the anti-spam word

Our Sponsors
Our Sponsors
Contact Us | FAQ | Sitemap | Terms of Use | Privacy Policy | Tell a Friend

Copyright © 1999-2006 Jeeve Technologies LLC. All rights reserved.