Determine knights and knaves roles
SIG (Susquehanna)Data Scientist · Technical ScreenLast updated
This interview question evaluates statistical assumptions, formulas, estimation strategy, uncertainty, edge cases, and interpretation in a realistic interview setting. A strong answer for Determine knights and knaves roles states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Question
On an island of Knights (always tell the truth) and Knaves (always lie), you meet two people A and B. B says to A: "You always lie". Considering the four possible assignments of roles (A is Knave, B is Knight; A is Knight, B is Knave; A is Knave, B is Knave; A is Knight, B is Knight), determine which assignment(s) are logically consistent and explain your reasoning.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.