Maersk - NoSQL Programming


                                                         NoSQL Programming

Find the last 15 palindromes that can be found below a given limit, including the limit in the search.

Given an integer limit being the upper limit of the range of interest, implement a function that returns the last 15 palindromes numbers lower or equal to limit as a list sorted ascendingly.

Examples

 generate palindromes(151) à

[ 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 131, 141, 151]

 generate palindromes(600) à

[ 454, 464, 474, 484, 494, 505, 515, 525, 535, 545, 555, 565, 575, 585, 595]

 generate palindromes(999999) à

[ 985589, 986689, 987789, 988889, 989989, 990099, 991199, 992299, 993399, 994499, 995599, 996699, 997799, 998899, 999999]

No comments:

Post a Comment