Hats and Genie Puzzle-Asked in Amazon interviews.

Question:

There are two tribes in Mars, Lie tribe and Truth Tribe.
Lie tribe always speaks lie, True tribe always speaks truth.

You meet three mars people and ask from the first Person:

Q: What tribe do you belong to?

He replies something in his language which you don’t understand.

Second person tells you that he is saying that he belongs to Lie Tribe.

Third person says that second person is lying.

What tribe does the third person belong to?

A) Truth Tribe

B) Lie Tribe

C) Can’t say

Solution: A is the solution

Lets assume that first person is from Truth tribe, then he will claim that he is from the truth tribe, in which case the second person is lying.Now assume that first person is from Lie tribe. Even then, he will say that he belongs to the truth tribe (as he is a liar), so second person is lying again in this case as well.
Thus third person is correct in both the scenarios, hence he belongs to Truth Tribe.

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.

--

--

--

Upskilling students for tech placements!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How To Get Angela Merkel Back For Good

CNY clouds

How to think about IoT — Part II

Wagyu Vs. USDA Prime

Welcome back, Grizzlies!

Supercharge Your Low-Maintenance Garden With This Showstopping Plant — Hibiscus Oiseau Bleu

5 petalled violet hibiscus Oiseau Bleu flower with magenta markings and an ivory centre. Photo by Rowan Ambrose

COVID-19 Might Be Changing Gig Shopping Forever

A Shipt-inspired COVID-19 still life

How to Mint MoonBabes & Connect your Wallet

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Placewit

Placewit

Upskilling students for tech placements!

More from Medium

Color of Next Ball Puzzle

14 Days Study Plan to Crack Algo I

One interview, Many learnings

Interview preparation -DSA #day1