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
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

Longest Road
logic
hashmaps
Solve
A startup company E-Motors is building driverless automated cars. The car contains a sensor that checks the road quality for the next N meters to decide the optimal speed at which the cars should move. We are given recorded data by the sensor in the form of an array, where each element of the array is the rating given to 1 meter of the road in sequence. 
            
            The rating given by the sensor is from 1 to 100, where 100 represents the road with the best condition, and any rating above 60 is optimal. Find the longest stretch of road in meters that is categorized as optimal by the sensor.
            
            The input is an array of "strings" which needs to be converted from string to integer/number inside the function.

Medium

Visitors Count
Strings
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
30 mins
Coding
Solve

Medium

Longest Road
logic
hashmaps
25 mins
Coding
Solve

Medium

Visitors Count
Strings
30 mins
Coding
Solve
🧐 Question🔧 Skill💪 Difficulty⌛ Time
Registration Queue
Logic
Coding
Easy30 minsSolve
Longest Road
logic
hashmaps
Coding
Medium25 minsSolve
Visitors Count
Strings
Coding
Medium30 minsSolve

Adaface questions are trusted by 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 default 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 1200+ companies in 75+ 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?
Chat with us
logo
40 min tests.
No trick questions.
Accurate shortlisting.
ada
Ada
● Online
Previous
Score: NA
Next
✖️