Problem Brief
Return Records π₯
INTERNOA
See Amazon online assessment and hiring insights
As an intern at Amazon, you have been assigned a task to implement the sign-in pages in the Amazon Dummy Website.
There are three sign-in pages, each with its own API:
Given a log of API requests, return the list of returns from the mock website.
Notes:
Function Description
Complete the function returnRecords in the editor below.
returnRecords has the following parameter:
string attempts[n]: each of the API requestsReturns
string[n]: an array of strings where #th string is the return value of the #th API requestqοΎπ κ°α Credit to neoέ ΰ»κ± π qοΎ
1Example 1
Input
attempts = ["register user05 qwerty", "login user05 qwerty", "logout user05"]
Output
["Registered Successfully", "Logged In Successfully", "Logged Out Successfully"]
Explanation

Check out the example image above π
2Example 2
Input
attempts = ["register david david123", "register adam 1Adam1", "login david david123", "login adam 1adam1", "logout david"]
Output
["Registered Successfully", "Registered Successfully", "Logged In Successfully", "Login Unsuccessfully", "Logged Out Successfully"]
Explanation

Constraints
Limits and guarantees your solution can rely on.