January 2018
Intermediate to advanced
332 pages
7h 36m
English
Now, let's create the mock data of our library books, which we want to sort and return when the users request the list of books. In this chapter, we will focus on sorting the library books by the number of pages in each book, so we can add only the page count and the ID of the book for simplicity, as shown in the following code:
[{"id":"dfa6cccd-d78b-4ea0-b447-abe7d6440180","pages":1133},{"id":"0a2b0a9e-5b3d-4072-ad23-92afcc335c11","pages":708},{"id":"e1a58d73-3bd2-4a3a-9f29-6cfb9f7a0007","pages":726},{"id":"5edf9d36-9b5d-4d1f-9a5a-837ad9b73fe9","pages":1731},...]
We want to test the performance of each of these algorithms, so let's add 5,000 of these books to ensure that we have enough data to test the performance. ...
Read now
Unlock full access