This is one of algorithmic problem I encountered in one of interview. Unable to figure out how to solve it in most efficient way.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
According by THIS QUESTION, in http://oeis.org/ you can find this class of number sequences: Check your's here.
Simply adapt the algorithm to fit your needs.
Here is my suggested code. It finds the smallest number with 0 and 7 (except the number 0) within the
long
range. In this case, I'm looking for the result for 11.