Skip to main content

Einstein's Puzzle

I guess many of you know about this puzzle but still iam posting for the ones who dont know.This is a puzzle made by Sir Albert Einstein once and told that 98% of people cannot solve this Puzzle.Though after trying for 30 minutes i solved it :-) You can try solving it.I will post answer for this after sometime.

Puzzle

*There are five houses that are each a different color (Red,Yellow,Green,Blue,White)
*There is a person of different nationality in each houses(German,British,Danish,Norwegian,Swedish)
*The five owners drink a certain drink (Milk,Beer,Water,coffee,Tea),smokes certain cigarettes (Pall mall,Prince,Dunhill,Blend,Bluemaster)and have different pets (Dog,Bird,Horse,cat,Fish).None of them uses same things

Some of the specification given of them:-

1)The British man lives in Red House
2)The swedish man has a dog as pet
3)The Danish man drinks Tea
4)The green house is to left of the White House
5)The owner of green house drinks coffee
6)The person who smokes Pall mall has a bird
7)The owner of Yellow house smokes Dunhill
8)The person that lives in middle house drinks milk
9)The Norwegian lives in first house
10)The person who smokes Blend lives next to the one who has a cat
11)A person that has a horse live next to the one who smokes dunhill
12)The one that smokes Bluemaster drinks Beer
13)The German Smokes Prince
14)The Norwegian lives next to blue house
15)The person that smokes blend has a neighbour who drinks water

So the question is "Who has a Fish"?

Comments

Popular posts from this blog

Tricky Questions or Puzzles in C

This post is about the Tricky Questions   or code snippet in C or C++ asked in most of the Interviews   (See Interview Experience ) by some of the good companies. You may know probably the right concept but it will not strike you at the interview and to crack all those Interview Questions  you should know some of them beforehand. If you are applying for Job related to JAVA then checkout the blog post  Tricky Questions in JAVA . 1) what will be the output of the following Printf function.   printf("%d",printf("%d",printf("%d",printf("%s","ILOVECPROGRAM")))); Ans-ILOVECPROGRAM1321 The above printf line gives output like this because printf returns the number of character successfully written in the output. So the inner printf("%s","ILOVECPROGRAM") writes 13 characters to the output so the outer printf function will print 13 and as 13 is of 2 characters so the next outer printf function will print 2 and then ...

Programs and Puzzles in technical interviews i faced

I have attended interview of nearly 10 companies in my campus placements and sharing their experiences with you,though i did not got selected in any of the companies but i had great experience facing their interviews and it might help you as well in preparation of interviews.Here are some of the puzzles and programs asked to me in interview in some of the good companies. CHECK-OUT the VIDEO of  Technical Interview for SAP Labs, CA Tech & HP R&D 1) SAP Labs I attended sap lab online test in my college through campus placements.It had 3 sections,the first one is usual aptitude questions which i would say were little tricky to solve.The second section was Programming test in which you were provided snippet of code and you have to complete the code (See Tricky Code Snippets  ).The code are from different data structures like Binary Tree, AVL Tree etc.Then the third section had questions from Database,OS and Networks.After 2-3 hours we got the result and i was sh...

Program to uncompress a string ie a2b3c4 to aabbbcccc

Below is the program to uncompress a string #include<stdio.h> #include<conio.h> #include<stdlib.h> int main() { char str[100]="a2b3c4d8u7"; for(int i=0;str[i]!='\0';i++) { if(i%2!=0) { for(int j=0;j<atoi(&str[i]);j++) { printf("%c",str[i-1]); } } } getch(); } Want to become a Data Engineer? Check out below blog posts  1.  5 Key Skills Every Data Engineer needs in 2023 2.  How to prepare for Data Engineering Interviews 3.  Top 25 Data Engineer Questions