Start hiring job-fit candidates using this assessmentGET A DEMO
"Interview Mocha's assessments eliminated reliance on resumes and reduced our time to hire by half. Now we spend time only on relevant candidates and take data-driven hiring decisions."
Global Analytics Team Lead
Marty wants to protect Alex, and for that, he has arranged a special force of expert officers. But Captain Chantel is also an intelligent enemy of Marty, and she has also arranged a bunch of expert shooters.
Now, Marty's strategy is to place his men in ascending order so that, if an enemy is going to attack, then the more experienced men can easily take over the enemy.
But, Captain Chantel also has a strategy. Captain Chantel will send her force in descending order of experience points so that their motive of killing Alex will be achieved, as, even if the most experienced ones die the less experienced ones can reach inside and kill Alex.
Now, you have been given an array of experience points of men, and you have to find the men belonging to Marty's Force and Captain Chantel's Force and print their experience points in appropriate order.
It consists of 2 lines.
The first line consists of a single integer N, the total number of men available to join the two forces.
The next line comprises on N space-separated integers, each integer denoting the experience points of a single man.
Output 2 lines.
The first line comprises of space-separated integers denoting the experience points of every man in Marty's Force in the appropriate order.
The next line comprises of space-separated integers denoting the experience points of every man in Captain Chantel's force in the appropriate order.
3 1 14 7 6 7 2
2 6 14
7 7 3 1
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 email@example.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
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...