Search test library by skills or roles
⌘ K

Adaface Sample Coding Questions

Here are some sample Coding questions from our premium questions library (10273 non-googleable questions).

Skills

🧐 Question

Easy

Registration Queue
Logic
Queues
Solve
We want to register students for the next semester. All students have a receipt which shows the amount pending for the previous semester. A positive amount (or zero) represents that the student has paid extra fees, and a negative amount represents that they have pending fees to be paid. The students are in a queue for the registration. We want to arrange the students in a way such that the students who have a positive amount on the receipt get registered first as compared to the students who have a negative amount. We are given a queue in the form of an array containing the pending amount.
For example, if the initial queue is [20, 70, -40, 30, -10], then the final queue will be [20, 70, 30, -40, -10]. Note that the sequence of students should not be changed while arranging them unless required to meet the condition.
⚠️⚠️⚠️ Note:
            - The first line of the input is the length of the array. The second line contains all the elements of the array.
            - The input is already parsed into an array of "strings" and passed to a function. You will need to convert string to integer/number type inside the function.
            - You need to "print" the final result (not return it) to pass the test cases.
            
            For the example discussed above, the input will be:
            5
            20 70 -40 30 -10
            
            Your code needs to print the following to the standard output:
            20 70 30 -40 -10

Medium

Visitors Count
Strings
Logic
Solve
A manager hires a staff member to keep a record of the number of men, women, and children visiting the museum daily. The staff will note W if any women visit, M for men, and C for children. You need to write code that takes the string that represents the visits and prints the count of men, woman and children. The sequencing should be in decreasing order. 
Example:
            
            Input:
            WWMMWWCCC
            
            Expected Output: 
            4W3C2M
            
            Explanation: 
            ‘W’ has the highest count, then ‘C’, then ‘M’. 
⚠️⚠️⚠️ Note:
            - The input is already parsed and passed to a function.
            - You need to "print" the final result (not return it) to pass the test cases.
            - If the input is- “MMW”, then the expected output is "2M1W" since there is no ‘C’.
            - If any of them have the same count, the output should follow this order - M, W, C.
🧐 Question🔧 Skill

Easy

Registration Queue
Logic
Queues

30 mins

Coding
Solve

Medium

Visitors Count
Strings
Logic

30 mins

Coding
Solve
🧐 Question🔧 Skill💪 Difficulty⌛ Time
Registration Queue
Logic
Queues
Coding
Easy30 minsSolve
Visitors Count
Strings
Logic
Coding
Medium30 minsSolve

Trusted by recruitment teams in enterprises globally

Amazon Morgan Stanley Vodafone United Nations HCL PayPal Bosch WeWork Optimum Solutions Deloitte Microsoft NCS Doubtnut Sokrati J&T Express Capegemini

We evaluated several of their competitors and found Adaface to be the most compelling. Great library of questions that are designed to test for fit rather than memorization of algorithms.


Swayam Narain, CTO, Affable

hashtag image heart icon Swayam
customers across world
Join 1500+ companies in 80+ countries.
Try the most candidate friendly skills assessment tool today.
g2 badges
Ready to streamline your recruitment efforts with Adaface?
Ready to streamline your recruitment efforts with Adaface?
logo
40 min tests.
No trick questions.
Accurate shortlisting.
ada
Ada
● Online
Previous
Score: NA
Next
✖️