Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Advanced Java Online Test – High Level Coding

Useful for hiring

  • Java Experts
  • Senior Java Programmers
  • Sr. Java Software Developers

Start hiring job-fit candidates using this assessment

GET A DEMO

"The best part of Interview Mocha is they have topic wise questions available. The skill wise extensive reports and advanced analytics lets us measure & benchmark the proficiency level of employees in that particular skill."

Cheryl Tolkinen, Securian, USA,
Learning & Development Manager
Question

The Men (M), Elves (E) and the Dwarves (D) are fighting for the Iron Throne. The three houses are fighting to capture the throne.

The Zth battle goes on for Z days before a winner emerges. Interestingly, the battles follow a pattern.
If the battle number Z is divisible by 3 it is fought between M and E,
If the remainder of the division with 3 is 1 it is fought between E and D and
If the remainder of a division with 3 is 2 it is fought between D and M.
Given a day number Y, you will have to say which two houses are fighting on the Yth day.

Input
The first line will contain an integer Y.

Output
You will have to report which of the two houses are fighting on the Yth day 
(i.e. you will have to print one of the three battles (ME, ED, DM))

Sample Input
6

Sample Output
ME

 

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at support@interviewmocha.com to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...
GET A DEMO

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates

GET A DEMO