You are on page 1of 2

Bajaj Finserv Programming Challenge - Data Science

KIIT - 11th July’22

Introduction
This is a two-step challenge and those who complete both the steps will be eligible for Qualifier 2.

You should adhere to the signature of the API and should get a response code “200” in the response to step 2
submit your entry successfully.

Challenge
Step 1:

a. Execute a get API and pass your college registered email id as an input parameter.
b. You will get a secret key (x) and a list of numbers (Y)
c. You need to calculate below statistics on the numbers received (Y)
I. Count
II. Minimum
III. Maximum
IV. Mean
V. Median
VI. Mode

Step 2:

a. Execute another post API and pass your secret along with the calculated statistical values.
b. You will get
I. “Your response has been submitted successfully” if you’ve sent expected body to the Post
API
II. “Please try again!!!” if these are any error in your Post request.

Authentication
These are open API and does not require any authentication or authorization
Error Codes
Any response other than ‘Your response has been submitted successfully’ and status code:200 would be
considered un-successful attempt. You can retry in case of any response message other than ‘Your response
has been submitted successfully’.
Rate limit
You can only try and call the API 10 times at max. In case of multiple attempts, the last correct attempt
would be considered as your final submission.
Step 1
Method Get

https://bfhldevapigw.healthrx.co.in/campus-hiring/input?id=Mobile
Endpoint

Your registered 10-digit mobile number


URL Param

Headers Not Applicable


Payload (Body) Not Applicable
Response {"Data":"[N1, N2, N3, N4, N5, ……]","Secret":"XXXXXXXX"}

Step 2

Method Post

https://bfhldevapigw.healthrx.co.in/campus-hiring/submit?id=Mobile
Endpoint

Your registered 10-digit mobile number


URL Param

Headers* Content-Type: application/json


{
"Size": Count of numbers in Y,
"Mean": Average of numbers in Y up to 2 digits after decimal (ex 51.54),
Payload (Body): "Median": Median of numbers in Y,
(All parameters "Mode": Mode of numbers in Y,
are mandatory) "Min": Minimum of numbers in Y,
"Max": Maximum of numbers in Y,
"Secret": “Secret received in step 1”,
}
Success
Your response has been submitted successfully
Response

Please note:

• Text highlighted in green would have actual numeric values (Y)


• You need to replace the text highlighted in Yellow with actual values
• Correct unique entries would be selected basis the ascending order of submission times.

*DO NOT FORWARD THIS DOCUMENT*

You might also like