Skip to content

Instantly share code, notes, and snippets.

@FaisalAl-Tameemi
Last active May 29, 2022 17:57
Show Gist options
  • Save FaisalAl-Tameemi/7a3e0d95f2c88ab423a99db3bcd6ac3d to your computer and use it in GitHub Desktop.
Save FaisalAl-Tameemi/7a3e0d95f2c88ab423a99db3bcd6ac3d to your computer and use it in GitHub Desktop.

Coding Questions

  1. Given an API response which returns a list of transactions, aggregate (sum) the transactions' amounts of a specific type
    • The aggregation function will run either daily or weekly, must return the correct response either way
    • How would you optimize this function?

API Endpoint: https://530a-5-107-84-27.ngrok.io/transactions

  1. Given the same API method above, write a function which returns the counts of each transaction type

  2. Extend the function written in Question #1 to allow multiple runs without recounting values already aggregated

    • For example, if running the function once on type = 'Interest Payout' yeilds a response of 10, running it again immediately should return 0 since all the previous transactions were already considered.
  3. Write a cron scheduler to run daily

Whiteboard Questions

  1. How would you design a payment processing (specifically billing) system for an e-commerce website?

    • Describe the endpoints necessary
    • Describe the data models necessary
    • Describe the code services necessary
    • The system should also deal with creating the order
  2. How would you implement a Postgres Joins optimizer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment