N26 Interview | Round 2 Coding Assignment| Transaction Statistics API
Anonymous User
1043
Apr 02, 2021
Apr 02, 2021
The /POST and /GET endpoints must execute in constant time and memory ie o(1).
POST
{
amount:"10",
"timestamp":2018-07-07T09:59:59.312Z"
}GET
This statistics API should return statistics of transaction based on last 60 seconds. This must execute in constant time and memory O(1)
{
"sum":50,
"avg":100.53
}The solution has to work without a database.
Any suggestions which datastructure to be used?
Comments (1)

