which has become very popular because there is a good chance to win at least something!
Millions of people buy this particular lottery. Lottery costs Rs. 10.
They get a 12 digit number when they buy the lottery.
Every hour the results are announced. Each number wins randomly from 0 to 9 Rs.
Few hundred numbers with 1000 Rs. Five numbers win 10,000 Rs. And one lucky number wins 1 Million Rs.
Millions of people buy the lottery every hour, and they login to an online system to check how much did they win.
What data structure and algorithm will you use to implement this