so I was just wondering on how CryptoKitties work. Like in order to query the price of each Kitty, do they querry like every single Kitty's price and then sort it out. Or is there a function or a better way to do this method.
In other words, if I have 1,000 elements do I have to "read" all 1,000 elements to query the results and thus makes a ranking of most expensive kitties? Or is there a function used to do this in the Smart Contract.