Number
摘要
This chapter talks about 21 number-based problems. These challenges are explained with some examples and then programmed in Python. 1. Checking if a number is Cyclop. 2. Checking if there is a domino cycle in a list of numbers. 3. Extracting increasing digits from a given string. 4. Expanding integer intervals. 5. Collapsing integer intervals. 6. Checking if a dice is left-handed or right-handed. 7. Bonus to repeated numbers. 8. Nearest first smaller number. 9. First preceding object by k smaller numbers. 10. Finding n-th term of calkin wilf. 11. Reverse ascending subarrays. 12. Smallest integer powers. 13. Sorting cycles of a graph. 14. Obtaining Numbers in Balanced Ternary System. 15. Is strictly ascending. 16. Priority Sorting. 17. Sort positives, keep negative numbers. 18. Sorting numbers first, characters second. 19. Sorting dates. 20. Sorting by alphabetical order and length. 21. Sorting by digit count.