Backend Software Interview Questions

15,454 backend software interview questions shared by candidates

Define a class which fit following conditions 1. initialize this class to contain the input string, which includes various numbers with delimiter "#". Following is an example: "100#3#18#11#123#500#96" 2. this class provides following 3 functions and output type should be integer: max: return the maximum number from the input string min: return the minimum number from the input string median: return the median number from the input string The input will be a string as following example:"100#3#18#11#123#500#96" The output should be an the integer sequence by the ordering: max, median and min separated by a dash, following is the example: 500-96-3 - Examples Input: "1#2#3" Output: 3-2-1 Input: "4#2#3#1" Output: 4-2-1
avatar

Backend Developer

Interviewed at Tomofun

4.4
May 29, 2024

Define a class which fit following conditions 1. initialize this class to contain the input string, which includes various numbers with delimiter "#". Following is an example: "100#3#18#11#123#500#96" 2. this class provides following 3 functions and output type should be integer: max: return the maximum number from the input string min: return the minimum number from the input string median: return the median number from the input string The input will be a string as following example:"100#3#18#11#123#500#96" The output should be an the integer sequence by the ordering: max, median and min separated by a dash, following is the example: 500-96-3 - Examples Input: "1#2#3" Output: 3-2-1 Input: "4#2#3#1" Output: 4-2-1

Viewing 211 - 220 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 15,454 interview questions and reports from Backend software interviews. Prepare for your interview. Get hired. Love your job.