Hats and Genie Puzzle-Asked in Amazon interviews.


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

Pulp Fiction Moments NOT to Relive in Public Around My Wife


The Float Tank Journals: Entry 22

Join My Email List and Get — How to Cheat: Field Notes from an Adulteress —  for free!

Weekend Prompt: “I’m in Awe of What my Body is Capable of”

I used to eat avocado toast nearly every day.


Hello Beer Goodbye Problems Tshirt

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


Upskilling students for tech placements!

More from Medium

Ants Puzzle

Leetcode 862. Shortest Subarray with Sum at Least K

World Trips Puzzle

Jelly Beans Jars Puzzle