Algorithm · Square · Medium
A calculator shows numbers on a seven-segment display, but a few of its segments are faulty: they stay dark no matter what digit is supposed to appear. As a result, the segments you can see lit are only a subset of the segments each true digit would normally turn on. You also know one fact about the number on the screen: reading left to right, its digits increase. Choose an encoding for the segments that are currently lit, and using it, return all of the integers that the…