Title: Cannibals and Missionaries
1TECHNICAL INTERVIEW QUESTION on
PUZZLESMISSIONARIES AND CANNIBALS
CodeGround Online Testing Platform is an online
assessment and evaluation system that helps
Recruiters conduct online screening tests to
filter candidates before the interview process.
CodeGround Recruitment Tests can be used during
Campus Recruitment or screening walk-in
candidates. CodeGround supports Aptitude Tests,
English Communication Skills Assessments and
Online Coding Contests in C, C, Java, PHP,
Ruby, Python and JavaScript. CodeGround also
supports asynchronous automated interviews.
2Missionaries and Cannibals
- Three missionaries and three cannibals must cross
a river. There is a single boat which can carry a
maximum of two people and there must be at least
one person on board (the boat cannot cross by
itself). - On either bank, if there are missionaries
present, the count of missionaries must be equal
or greater than the count of cannibals, else the
cannibals would eat them.
3This is a classic example of a puzzle that can be
solved using state transition diagrams
4Missionaries and Cannibals
Missionary
Boat
Cannibal
5Was this Content Useful?
Like
Share
Comment
CodeGround Online Testing Platform is an online
assessment and evaluation system that helps
Recruiters conduct online screening tests to
filter candidates before the interview process.
CodeGround Recruitment Tests can be used during
Campus Recruitment or screening walk-in
candidates. CodeGround supports Aptitude Tests,
English Communication Skills Assessments and
Online Coding Contests in C, C, Java, PHP,
Ruby, Python and JavaScript. CodeGround also
supports asynchronous automated interviews.