# Build robust, distributed leaderboards with Cloud Firestore quiz

<br />


Return to pathway
1.

   ## Why might you choose a *stochastic* leaderboard over an *exact* leaderboard?


   Choose as many answers as you see fit.
   A stochastic leaderboard is generally faster when reading ranks. A stochastic leaderboard allows faster rank updates than a periodically-updating exact leaderboard. A stochastic leaderboard always requires fewer document updates per new score than a periodically-updating exact leaderboard. A stochastic leaderboard generally suffers from higher lock contention than other leaderboard implementations.
2.

   ## In which situation would a simple leaderboard with all scores stored in a flat Cloud Firestore collection be most ideal?

   A long, slow game with few new high scores, frequent leaderboard reads, and a large number of players. A long, slow game with few new high scores, infrequent leaderboard reads, and a small number of players. A short, fast game with many new high scores, frequent leaderboard reads, and a large number of players. A short, fast game with many new high scores, infrequent leaderboard reads, and a large number of players.
3.

   ## What is the average case complexity of the tree leaderboard for the addition and retrieval of scores where *n* is the number of scores in the leaderboard?

   `O(log n)` `O(n)` `O(n * log n)` `O(1)`
4.

   ## Generally, which leaderboard requires the fewest reads and writes to fetch and create scores for a large leaderboard?

   A simple leaderboard A periodically-updating leaderboard A tree leaderboard A stochastic leaderboard
5.

   ## What is the only leaderboard that does not allow for real-time updates?

   A simple leaderboard A periodically-updating leaderboard A tree leaderboard A stochastic leaderboard
6.

   ## Fill-in-the-blanks


   Enter one or more words to complete the sentence.

   Usually, NoSQL databases lack ___, so they don't explicitly define field properties, such as name and type.

<button class="button-primary devsite-quiz-submit-button" type="submit"> Submit answers </button>


*error_outline* An error occurred when grading the quiz. Please try again.