Salesforce Fact #929 | Nth highest in screen flow

We can find the Nth highest value in screen flow using Get Records with a bit of logic. For example, we want to find the Nth highest NumberOfEmployees value across all the accounts. The idea is to fetch the records and then run a check to iterate over the records as long as the temp variable value is less than N value. The temp variable is initialized to 1. In the assignment we would keep on removing the first record. At the end, we will pick the first record from the collection. Attached are the screenshots. Note: this is just a POC flow and the error handlings, best practices are not covered.