I’m trying to make an algorithm that calculates what keys can be pressed in a numeric keyboard, based on limits (min and max values) predetermined. So I can hide those keys that are “unavailable”.
Let’s supose the value will be from 89 to 120. So what are the “first” keys available? And “second” keys, based on first one ? And so on…
Any tip (or link) will be very welcome.
You can use a trie data structure for tens, hundreds, thousands.