EDITED: Please show respect to everyone who is helping on this forum. We are very strict if we suspect the question is about earning apps. So you could have simply said no as @vknow360 was stating. I replaced your text with this explanation.
I was just asking.
If your answer is no then I have no problem in helping you.
I am sorry if I have hurt your hard work.
Wait…
Just making a topic does not ensures that you can get answer easily.
Please show what you have tried.It gives anyone an idea about your app and helps us to help you.
You can do something like this.
Store all users ranking in firebase in this way that tag= ranking and value = username .
The get tags list and run for each number from block where from 1 to 10 and reward corresponding user prize and in other for each number from block where from 11 to length of list and reward corresponding user prize.
Note: This method is useful when you use point system using firebase.