Skip to content

Instantly share code, notes, and snippets.

@anhldbk
Last active November 7, 2019 02:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anhldbk/11f38f73c4525e31685d3ff2f56c2095 to your computer and use it in GitHub Desktop.
Save anhldbk/11f38f73c4525e31685d3ff2f56c2095 to your computer and use it in GitHub Desktop.
ZaloPay Challenges on Java Programming

1. Overview

  • This is an entry test for our ZaloPay candidates
  • He/she must write solutions in English to answer following problems
  • Code must be written in Java

2. Problems

2.1 Thread safety

  • What is thread safety? Why do we need it?
  • HashMap<Int, String> by default is NOT thread safe.
    • How can you make it thread-safe ?
    • Show your code & identify any bottle neck may have impact on your code performance
    • Suggest your improvement (if any)

2.2 Map

  • Design & implement your own Map<Int, String> (only put and get operations) . Hints:
    • You have to design appropriate data structures using only primitives such as: array, string, number.
    • Implement
    • Evaluate your implementation complexities for put and get

3. Deadline

2 days

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